[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] XML source with DOCTYPE declaration
Subject: Re: [xsl] XML source with DOCTYPE declaration From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 23 Apr 2001 17:57:43 +0100 |
> It's really hard to believe that such a 'trivial' thing is causing such > 'sophisticated' stylesheets!! :( XSLT isn't really designed to correct source files that have this error. The source files for XHTML documents should have the namespace specified. Then your stylesheet wouldn't have this problem. If you want to make a template match on two elements, one called xxx and one called yyy then you have to do either <xsl:template match="xxx|yyy"> or <xsl:template match="*[local-name()='xxx' or local-name()='yyy']"> This is the case you are in, you want to match against an element called html in the XHTML namespace and an element called html in no namespace. For a namespace aware processor these are just completely different elements, with different names. So if h: is the XHTML namespace, you need <xsl:template match="h:html|html"> or <xsl:template match="*[local-name()='html']"> Is either of those really hard or surprising, given that you are matching against two different elements? 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 -> |
---|---|---|
Re: [xsl] XML source with DOCTYPE d, Zeljko Rajic | Thread | Re: [xsl] XML source with DOCTYPE d, Wendell Piez |
Re: [xsl] Number comparison vs. str, David Carlisle | Date | [xsl] MSXML4, Robert Seber |
Month |