[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: simple XPath question
Richard Lanyon wrote: > [H]ow do I refer to the default namespace within an XPath expression? select="namespace::node()[local-name(.)='']" For example, if you are given: <?xml version="1.0"?> <test xmlns="hello" /> Processed by: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform> " xmlns:h="hello" version="1.0"> <xsl:template match="h:test"> <xsl:value-of select="namespace::node()[local-name(.)='']" /> </xsl:template> </xsl:stylesheet> The output produced should be: <?xml version="1.0" encoding="UTF-16"?>hello Both SAXON and the Microsoft XSLT processor perform this operation wonderfully. XT, and Oracle's processor report "namespace axis not implemented". Sabaloton and Xalan produce just the XML declaration and fail to show any error. Kind Regards, Clark Evans
|
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
|