[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath problem with namespace attribute
Matthew Hailstone wrote:
It seems there is a bug in the XPath result when an empty namespace attribute is used: With XPath 1.0 'foo' selects elements with local name 'foo' in no namespace. As the elements 'Three', 'Four' and 'Five' are in the namespace http://www.hailstone.org/ you need to bind a prefix to that namespace URI and use that prefix in the XPath expresssion to qualify element names. How you bind a prefix to the namespace URI depends on the XPath API you use. Within an XSLT stylesheet you can use <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:hs="http://www.hailstone.org/" version="1.0"> and then use e.g. /One/Two/hs:Three/hs:Four/hs:Five -- Martin Honnen http://JavaScript.FAQTs.com/
|
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
|