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

RE: dynamically generated XSL that needs to include n

Subject: RE: dynamically generated XSL that needs to include namespace for extension functions
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 14 May 2004 13:43:28 +0100
xslt include namespace
> I am using a stylesheet to generate XSL within an 
> xsl:document command.

Not sure what you mean by the xsl:document "command" - do you mean the XSLT
1.1 instruction of that name?
> 
> The problem I have is that I want to include the xmlns:str 
> namespace to my
> generated stylesheet so that I can use the EXSLT string function
> uri-decode().

XSLT 2.0 has an xsl:namespace instruction for this purpose. In 1.0 there is
a workaround: copy the namespace from a source document. E.g.

<xsl:variable name="dummy">
  <str:dummy xmlns:str="the namespace"/>
</xsl:variable>

<xsl:copy-of select="xx:node-set($dummy)//namespace::str"/>

Michael Kay

(XQuery, incidentally, decided not to provide this capability. I think I
will start pointing out all the things you can do with XSLT 2.0 and not with
XQuery 1.0, just in case anyone believes that Microsoft have got it
right...)

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.