xsl-list
[Top] [All Lists]

RE: [xsl] Prevent compilation error for xsl:namespace in XSLT 1.0

2007-01-14 11:40:51

  ...actually, I found that Saxon 6.5.5 fails here, reporting 
a compilation error:


What exactly did you do? The following compiles and executes successfully
under Saxon 6.5.5:

<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">
    
    <!-- Test xsl:namespace guarded by element-available()  -->
   
    <xsl:template match="/">
       
                        <a>
                          <xsl:if test="element-available('xsl:namespace')">
                                  <xsl:namespace name="pre">
                                     <xsl:sequence select="'uri'"/>
                                  </xsl:namespace>
                          </xsl:if>  
                      </a>
               
    </xsl:template>
</xsl:stylesheet>

Michael Kay
http://www.saxonica.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>
--~--