[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML source with DOCTYPE declaration

Subject: Re: XML source with DOCTYPE declaration
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 23 Apr 2001 17:57:43 +0100
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.