Subject: Re: 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 |
- AW: disable-output-escaping in attributes, (continued)
- Julian Reschke - Sun, 22 Apr 2001 04:12:03 -0400 (EDT)
- David Carlisle - Sun, 22 Apr 2001 14:44:39 -0400 (EDT)
- Jeni Tennison - Sat, 21 Apr 2001 04:09:42 -0400 (EDT)
- Zeljko Rajic - Mon, 23 Apr 2001 09:26:15 -0400 (EDT)
- David Carlisle - Mon, 23 Apr 2001 12:57:42 -0400 (EDT) <=
- Wendell Piez - Fri, 20 Apr 2001 15:29:45 -0400 (EDT)
- Wendell Piez - Fri, 20 Apr 2001 16:12:04 -0400 (EDT)
- David Carlisle - Fri, 20 Apr 2001 17:49:53 -0400 (EDT)
- Wendell Piez - Fri, 20 Apr 2001 18:47:32 -0400 (EDT)
|
|