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

Namespace issues

Subject: Namespace issues
From: "Joel Håkansson" <joel.hakansson@xxxxxx>
Date: Thu, 19 May 2005 16:54:00 +0200
namespace issues
I have two different versions of an XML-format. The first one contains
no namespace declaration and the second (newer) contains a value for the
default namespace in the root-element.

Thus to match elements in the newer spec. I have to write for example
match="myns:root" while in to match elements in the older spec. I can
use match="root".

If I already have an XSLT that transforms the older version and would
like to apply that to a document following the newer specs, I have two
options:
1) Remove the xmlns declaration from the source document before
applying the transformation
2) Rewrite the xslt, like
  <xsl:stylesheet xmlns:myns="..."...
    <xsl:template match="myns:root"...

Consequently, if I want a single stylesheet transforming both versions,
I have to use:
  <xsl:template match="root|myns:root"> and so on

Have I got it right?

Joel

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.