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

adding a namespace to a stylesheet automatically

Subject: adding a namespace to a stylesheet automatically
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Tue, 28 Oct 2003 15:59:30 -0600
 adding a namespace to a stylesheet automatically
Hi all,

Suppose you write a stylesheet to process a source document
that has no namespace.

Then you decide to add a namespace to the source document:
  <doc xmlns="scribble"> ... </doc>

So now everywhere in your stylesheet that you want to select
or match elements in the source document, you have to
insert a prefix.

E.g. you have to change

 <xsl:template match="foo">
   <xsl:if test="parent::bar[@baz] = /*/squid">...</xsl:if>

into

 <xsl:template match="myns:foo">
   <xsl:if test="parent::myns:bar[@baz] = /*/myns:squid">...</xsl:if>

Has anyone written a program (e.g. a stylesheet) to do this
automatically?

Thanks,
Lars


 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.