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

Adding/Coercing a Namespace

Subject: Adding/Coercing a Namespace
From: "Richard Lander" <rlander@xxxxxxxxxxxxx>
Date: Fri, 14 Feb 2003 09:08:40 -0800
adding to a namespace
 Morning,

I've got an interesting problem that I've never encountered before, and don't quite know how to solve in an elegant way.

I've got an XML file that maps XPaths to something else. The XPaths are namespace qualified, along the lines of 'cs:para'.

I then transform [1] that file into a transform [2]. 

In the first transform, I have something like:

<x:transform version="1.0" xmlns:cs="myNs">

Note that I'm using namespace aliasing, hense the 'x:'.

In the second transform, I naturally end up with something like:

<xslt:transform version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:cs="myNs" xmlns:other="otherNs">

It includes templates such as:

<xslt:template match="cs:para">
	<other:foo/>
</xslt:template>

I'm not particularly fond of this approach. I'd like some way of coercing the myNs namespace to be added to transform 2. Other namespaces are auto-added to the second transform, as they are part of the content of the first transform. myNs is not part of the content of first transform. In fact, I'd like to use my scheme with several different namespaces, so do not want to have to mod transform 1 for each one.

I guess that I could add a fake template in an included transform that included some elements in the myNs namespace. Might that coerce the namespace in the way that I want?

Hopefully this makes sense.

Thanks,

Rich


 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.