Subject: Re: [xsl] ***********Transformation of an XML document containing a default namespace ************ From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 24 Oct 2001 15:30:13 -0400 |
> I tried doing something like this a few weeks ago and it didn't work > for me. There seems to be no way to control which namespace prefix > (including the "empty" prefix) the serializer uses if there is more > than one prefix for a given namespace URI.
there are two answers to this: "yes" and "no".
According to the spec, you _never_ get any control over th eprefixes used, and it is perfectly OK for an XSLT serialiser to always use prefixes like kmsqzzxss1: kmsqzzxss2: .... even if the stylesheet uses fo: or whatever. (So this is the no, it can't be done answer)
However most (all?) systems do in fact try to preserve the namespace prefixes in most situtaions.
<xsl:template match="foo"> <xslo:value-of select="system-property('xslo:version')"/> </xsl:template>
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products. Book: Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3 Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html Next public training (instructor-live, Internet-live, and web-based): -2001-10-22,11-01,11-02,11-05,11-19,11-21,12-03,12-05,12-09,12-10,12-19
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] ***********Transformation, David Carlisle | Thread | Re: [xsl] ***********Transformation, David Carlisle |
[xsl] counting characters in an XML, Tom Melkonian | Date | Re: [xsl] ***********Transformation, David Carlisle |
Month |