Re: xPath and default namespaces.
> I'm having some problems with resolving an xPath expression on some XML that > sets a default namespace like this XHTML code. this is a FAQ, but basically <html xmlns="http://www.w3.org/1999/xhtml" is an element with local name html in the XHTML namespace and "//body" is a (very inefficient) XPath looking for all instances of an element with local name body in no namespace. In particular this does not match any element in the XHTML namespace. You want to add xmlns:h="http://www.w3.org/1999/xhtml" to your xsl:stylesheet then match on h:body rather than body. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp 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