XSLT 1.0 does not recognize the version attribute on xsl:namespace. It
recognizes only a version attribute on xsl:stylesheet, or an xsl:version
attribute on a literal result element.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Florent Georges [mailto:darkman_spam(_at_)yahoo(_dot_)fr]
Sent: 14 January 2007 22:21
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Prevent compilation error for
xsl:namespace in XSLT 1.0
Michael Kay wrote:
Hi
What exactly did you do?
(drkm)[66] ~/xslt/tests$ cat xsl-ns.xsl
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- Test xsl:namespace guarded by element-available() -->
<xsl:template match="/">
<a>
<xsl:if test="element-available('xsl:namespace')">
<xsl:namespace
name="pre"
select="'uri'"
version="2.0"/>
</xsl:if>
</a>
</xsl:template>
</xsl:stylesheet>
(drkm)[67] ~/xslt/tests$ saxon6 xsl-ns.xsl xsl-ns.xsl
Error at xsl:namespace on line 10 of xsl-ns.xsl:
Unknown XSLT element: namespace
Transformation failed: Failed to compile stylesheet.
1 error detected.
(drkm)[68] ~/xslt/tests$
Regards,
--drkm
______________________________________________________________
_____________
Découvrez une nouvelle façon d'obtenir des réponses à toutes
vos questions !
Profitez des connaissances, des opinions et des expériences
des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--