Re: [xsl] Namespace issues

Subject: Re: [xsl] Namespace issues
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 19 May 2005 16:04:08 +0100
  Consequently, if I want a single stylesheet transforming both versions,
  I have to use:
  <xsl:template match="root|myns:root"> and so on

Or
match="*[local-name()='root']"

In XSLT2 you will be able to do

match="*:root"
or 
use the default-xpath-namespace attribute on xsl:stylesheet to control
in one place whether

match="root"

matches no-namespace or your new namespace.

If your old XML files have a <!DOCTYPE then an alternative plan would be
to edit the DTD so that the namespace declaration is defaulted, so then
old and new would all be in the same namespace. Actually given support
for any kind of catalogue mechanism you can do this even if they don't
have a doctype explictly, as the catalogue can default a DTD based on
the top level element name, and the DTD can then default the namespace
declaration.

David
PS
You are not alone:-)

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread