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

RE: Creating namespace declarations

Subject: RE: Creating namespace declarations
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 13 Jun 2001 11:34:30 +0100
creating namespace example
> this is more a request for confirmation than a real question ...
> Am I right, that there's no way in XSLT 1.0 to create
>
> <example xmlns:ns="urn:namespace" value="ns:something" />
>
> if "urn:namespace" should be provided as a parameter (i.e.
> there aren't
> namespace nodes for this namespace, neither in the XML source
> nor in the stylesheet).
>
You are right. The requirement is recognized in the published XSLT 2.0
requirements.

You can get close in XSLT 1.0 (+errata) by creating an external document
dd.xml

<doc xmlns:ns="urn:namespace/>

and doing

<example>
  <xsl:copy-of select="document('dd.xml')/doc/namespace::ns"/>
  <xsl:attribute name="value">ns:something</xsl:attribute>
</example>

But it's probably simpler to create a dummy attribute in the required
namespace.

Mike Kay
Software AG


 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.