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

xmlns created literally

Subject: xmlns created literally
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Thu, 26 Feb 2009 12:16:38 +0100
 xmlns created literally
We are allowed to create xmlns or xmlns:* the literal way, but we can
apparently not use attribute value template for the namespace. This is
probably not that surprising since we cannot create xmlns or xmlns:*
with xsl:attribute.

But it surprices me that we don't get an error message. The following
stylesheet is tested with Saxon 9 in Oxygen and with AltovaXML 2009 in
XMLSpy:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output indent="yes"/>
    <xsl:template name="start" match="/">
        <xsl:param name="x" select="'asdf'"/>
        <catalog>
            <product xmlns="asdf">some data</product>
            <product xmlns="{$x}">some data</product>
        </catalog>
    </xsl:template>
</xsl:stylesheet>

We get the following output in Oxygen:

<catalog>
   <product xmlns="asdf">some data</product>
   <product xmlns="{$x}">some data</product>
</catalog>

And the following output in XMLSpy:

<catalog>
<product xmlns="asdf">some data</product>
<product xmlns="%7B$x%7D">some data</product>
</catalog>

The one even more strange than the other! Should it have been an error
message instead? Or should the attribute value template work?


Cheers,
Jesper Tverskov

http://www.xmlkurser.dk
http://www.xmlplease.com

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.