[thelist] Another XSL question
Mark Kennedy
mark at eurogamer.net
Thu Mar 13 05:35:46 CST 2003
XSLT specification explicitly states that you cannot define the namespace for
your result tree using
<xsl:attribute name="xmlns">
So maybe the converse is true in that you can't access xmlns as an attribute
either. This is all I can find right now I'm afraid.
Mark
On Wed, 12 Mar 2003 David.Cantrell at Gunter.AF.mil wrote:
>Here's another question I can't seem to find the answer to on Google...
>
>Given the following barebones stylesheet:
>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:foo="foo/bar"
> exclude-result-prefixes="xsl foo"
> version="1.0">
></xsl:stylesheet>
>
>And assuming I have another stylesheet I want to apply to the above
>stylesheet skeleton, how can I access the "xmlns:*" attributes?
>
>I've tried tons of ways, including directly accessing the values:
>
> <xsl:value-of select="/xsl:stylesheet/@xmlns:foo"/>
> <xsl:value-of select="/xsl:stylesheet/@foo"/>
>
>Using namespace-uri:
>
> <xsl:value-of select="namespace-uri(/xsl:stylesheet/@xmlns:foo)"/>
> <xsl:value-of select="namespace-uri(/xsl:stylesheet/@foo)"/>
>
>And using more convoluted means:
>
> <xsl:for-each
>select="/xsl:stylesheet/attribute::*[contains(name(),'xmlns')]"/>
>
>But none of these work.
>
>When I do this:
>
> <xsl:for-each select="/xsl:stylesheet/@*">
> <xsl:value-of select="name()"/> <!-- pretend there's a line
>break of some sort here for now -->
> </xsl:for-each>
>
>All I get is this output:
>
> exclude-result-prefixes
> version
>
>Is "xmlns" a "protected" attribute/namespace, so there is no way to access
>it?
>
>Thanks in advance,
>-dave
>--
>* * Please support the community that supports you. * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester
>and archives of thelist go to: http://lists.evolt.org
>Workers of the Web, evolt !
>
More information about the thelist
mailing list