I'm trying to import the following XML data: <?xml version="1.0" encoding="utf-8"?> <customers xmlns="http://acme.com/schema/v1_2/customers.xsd"> <customer ID="1"> <city>Monterey</city> <name>Herbson's Pices</name> <orders> <order ID="ORD2"> <num>1</num> <date>12-01-2002</date> <amount>23.54</amount>
The xmlns="http://acme.com/schema/v1_2/customers.xsd" is called a namespace declaration. It places all elements of your input XML in the declared namespace. This is why your instruction: <xsl:for-each select="./customers/customer"> does not select anything. In order to address elements in a namespace, you must declare the same namespace in your stylesheet, assign it a prefix, and use that prefix when addressing the elements: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/