Re: [xsl] Why oh Why?? Namespace generation problem.

Subject: Re: [xsl] Why oh Why?? Namespace generation problem.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 28 Feb 2003 00:54:18 GMT
> 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
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

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.


 XSL-List info and archive:

Current Thread