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

Re: Why oh Why?? Namespace generation problem.

Subject: Re: Why oh Why?? Namespace generation problem.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 28 Feb 2003 00:54:18 GMT
generation why
> Namespaces are special and all, but this is ridiculus! Why treat them any 
> different.

They are not treated differently. Namespaces are not attributes they are
part of the name, allowing AVT's there would be like allowing AVT's
in the local part of a name as in
<{$foo}>
to produce a result element with the name given by the variable.

both local names and namespaces need to be known before the stylesheet
starts (in particular to know whether that xmlns=... is going to resolve
to the XSLT namespace.

The solution to generate an element with its name being determined at
runtime is the same whether it's the local name or the namespace name
component of the elements name, use xsl:element, although in your case


> I also bumped into problems with trying to create an xmlns attribute
> with 
namespace declarations are explictly not attributes in Xpath, they do
not match @* and you can not create them with xsl:attribute, this is
consistent.

You shouldn't have to generate the default namespace declaration at all
just arrange that your stylesheet generates the child elements of
xsd:annotation in the correct namespace and the system will insert a
namespace declaration at a suitable point (or points)

If you do not know what that namespace is until runtime you will need to
generate all descendent elements of this xsd:annotation using
xsl:element and supply $docURL as the namespace name in each case.

David

 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.