|
Subject: Re: problem generating dynamic namespace declarations From: "Dave Carlson" <dcarlson@xxxxxxxxxxxxxx> Date: Tue, 18 Jul 2000 13:25:55 -0600 |
Thanks for all of the replies to my question. I think that this
message from Mike Kay hits the crux of the problem. I *was*
considering the fact that generating an element from the desired
namespace would cause XSLT to add the necessary namespace declaration.
But, if I read the XML Schema spec correctly, the target namespace
never appears on an element or attribute, rather it appears as a QName
in an attribute *value*. e.g.
<element name="Person" type="bib:PersonType/>
<complexType name="PersonType">
etc.
At least, the examples in the XML Schema Primer look like this one,
and the spec defines the 'type' attribute as having a QName value.
I'm not clear on how I could generate an unwanted element or attribute
from the target namespace that would be valid within the XML Schema.
Dave
----- Original Message -----
From: Kay Michael <Michael.Kay@xxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Tuesday, July 18, 2000 3:28 AM
Subject: RE: problem generating dynamic namespace declarations
> > But in this case as is the case if writing xpath valued
attributes,
> > this isn't quite what you want to do, as you want to generate a
> > namespace declaration that isn't used in the element or
> > attribute name.
>
> Yes, the requirement is there and I think there's no way of doing
it. If you
> wanted to generate, for example:
>
> <xsl:variable name="my:var" select="3" xmlns:my="me.uri"/>
>
> you would have to do it by generating an unwanted attribute
my:dummy, for
> example by writing
>
> <axsl:variable name="my:var" select="3" my:dummy=""
xmlns:my="me.uri"/>
>
> Mike
>
> PS: copying namespace nodes using <xsl:copy>, as per your previous
reply,
> isn't guaranteed to work: the effect is undefined.
>
>
> XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: problem generating dynamic name, David Carlisle | Thread | RE: Replacing attribute values [was, Kay Michael |
| xsl:when and xsl:choose, Foster, Justin (IT_A | Date | sub-documents with their own styles, Ken MacLeod |
| Month |