xsl-list
[Top] [All Lists]

[xsl] exclude-result-prefixes required in each imported stylesheet

2006-09-18 08:49:05
It seems exclude-result-prefixes needs to be explicity set for each
imported stylesheet, rather than using the value in the importing
stylesheet - is that right?

For example:

<xsl:stylesheet version="2.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:xs="http://www.w3.org/2001/XMLSchema";
 exclude-result-prefixes="xs">

<xsl:import href="b.xslt"/>

<xsl:template match="/">
        <xsl:call-template name="foo"/>
</xsl:template>

</xsl:stylesheet>

b.xslt:

<xsl:stylesheet version="2.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:xs="http://www.w3.org/2001/XMLSchema";>

<xsl:template name="foo">
        <foo/>
</xsl:template>

</xsl:stylesheet>

The result is:

<foo xmlns:xs="http://www.w3.org/2001/XMLSchema"; />

Is there any reason why the exclude-result-prefixes value isn't taken
from the importing stylesheet?  Not the biggest issue I know, just
struck me as odd.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>