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

Why oh Why?? Namespace generation problem.

Subject: Why oh Why?? Namespace generation problem.
From: Danny Vint <dvint@xxxxxxxxxxxxxx>
Date: Thu, 27 Feb 2003 14:46:18 -0800
.xsd namespace generation
I just ran into an interesting problem. I'm using Saxon but I don't think it makes any difference.

In a stylesheet I can have the following:

<xsd:annotation xmlns="http://www.ACORD.org/standards/Support/xml/v1.0">

	... output here  with tags from my namespace ...
	</xsd:annoation>

but change it to use a variable defined with the same value like this:

<xsd:annotation xmlns="{$docURL}">

	... output here  with tags from my namespace ...
	</xsd:annoation>

And the result instead of having the value of the variable, generates
	<xsd:annotation xmlns="{$docURL}>

Change xmlns to something like "foo" and I get the proper substitution.

Namespaces are special and all, but this is ridiculus! Why treat them any different.

I also bumped into problems with trying to create an xmlns attribute with the <xsl:attribute> element. Again, why do these have to be declared directly without variable substitution and the only way that seems to work is to use <xsl:element> except that will not allow me to create a default namespace, it wants to declare the URL for the prefix used on the element name being created.

..dan
---------------------------------------------------------------------------
Danny Vint
http://www.dvint.com





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.