Subject: Re: [xsl] xPath and default namespaces. From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 11 Apr 2001 22:02:52 +0100 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xPath and default namespaces., dwight funk | Thread | RE: [xsl] xPath and default namespa, dwight funk |
[xsl] Recursion/Iteration Problem, Subhasri Rajagopalan | Date | Re: [xsl] XHTML friendly XSL proces, David Carlisle |
Month |