|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Creating namespace declarations
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








