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

Templates, Q Names and namespaces

Subject: Templates, Q Names and namespaces
From: "Paul Spencer" <paul.spencer@xxxxxxxxxxxxxx>
Date: Thu, 23 Nov 2000 09:01:41 -0000
q names
In an XML document, I might have an element

<my:elem xmlns:my="http:myco.com">...</my:elem>

In a stylesheet, I can write something like:

<xsl:apply-templates select="my:elem"/>

<xsl:template match="my:elem">...</xsl:apply-templates>

Now, if I apply my stylesheet a new document containing:

<m:elem xmlns:m="http:myco.com">...</m:elem>

my stylesheet will no longer work. Equally, I could be using a default
namespace in the source document.

What is the simplest way to make my stylesheet independent of the prefix
used for the namespace, while keeping it correctly attached to the namespace
URI itself? And are there known XSL implementations where this doesn't work
(I know implementations of namespaces in some XSL implementations is rather
flaky).

Regards

Paul


 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.