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

Template matching with multiple namespaces

Subject: Template matching with multiple namespaces
From: "Tony Rowe" <tony.rowe@xxxxxxxxxxxxxx>
Date: Fri, 20 Mar 2009 14:18:58 +1100
 Template matching with multiple namespaces
Hi,

I have a stylesheet which works with one namespace, prefix say 'lml'. I
now want the same stylesheet to work on documents under another
namespace, say lml10.

Here is my namespace defs...

<xsl:stylesheet version="1.0"
 xmlns:lml=...
 xmlns:lml10=...
 xmlns:msxsl=...
 xmlns:xsl="...
 >

Now the stylesheet does, of course match nodes such as

<xsl:apply-templates select=".//lml:LandXML" />

But I want it to also match on

<xsl:apply-templates select=".//lml10:LandXML" />.

How can I set up some variable to allow me not to have to duplicate
code?

This doesn't work...NodeTest expected.
<xsl:apply-templates select=".//{$namespacevariable}:LandXML" />

Or is there a better way to get the one stylesheet to work over multiple
namespaces?

I am using XSLT 1.0 still because I need to use the MSXML parser 6.0.

Tony

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.