[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Templates aplied to namespaces
I have an input document that looks like this: <?xml version="1.0" encoding="UTF-8" ?> <ROOTELEMENT xmlns="http://www.somewhere.com/mynamespace"> <ERRORCODE>0</ERRORCODE> <BOOKLIST> That is the same input document as this: <?xml version="1.0" encoding="UTF-8" ?> <x:ROOTELEMENT xmlns:x="http://www.somewhere.com/mynamespace"> <x:ERRORCODE>0</x:ERRORCODE> <x:BOOKLIST> That is, an XSLT engine sees the same input tree in either case. It is probably simpler to think of the latter syntax rather than the former when writing the stylesheet, even if you know all the actual documents are in the first form. so <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:x="http://www.somewhere.com/mynamespace" > <xsl:template match="x:BOOKLIST"> ... <xsl:for-each select="x:ERRORCODE"> ... David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|