|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML source with DOCTYPE declaration
> 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
|
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
|

Cart








