You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mingfei Peng <mf...@excite.com> on 2000/11/24 04:42:01 UTC

Question about element-available()

It seems that Xalan(both Xalan-J and Xalan-C) doesn't accept prefix in
element-available function, I write an XSL file inluding something like the
following:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
...
   <xsl:if test="not(element-available('xsl:if'))">
   ...
   </xsl:if>
...

Xalan reports:
Error! ElemTemplateElement error: Can not resolve namespace prefix: xsl.

If I use element-available('if'), there will be no error message for
Xalan-C. But I remember the older version of Xalan-C seems to accept this.
Saxon also accept it.

Do I need to add something more to the XSL file?






_______________________________________________________
Tired of slow Internet? Get @Home Broadband Internet
http://www.home.com/xinbox/signup.html


Re: Question about element-available()

Posted by Gary L Peskin <ga...@firstech.com>.
Mingfei Peng wrote:
> 
> It seems that Xalan(both Xalan-J and Xalan-C) doesn't accept prefix in
> element-available function, I write an XSL file inluding something like the
> following:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> ...
>    <xsl:if test="not(element-available('xsl:if'))">
>    ...
>    </xsl:if>
> ...
> 
> Xalan reports:
> Error! ElemTemplateElement error: Can not resolve namespace prefix: xsl.
> 
> If I use element-available('if'), there will be no error message for
> Xalan-C. But I remember the older version of Xalan-C seems to accept this.
> Saxon also accept it.
> 
> Do I need to add something more to the XSL file?

I've just committed a CVS update for XalanJ2.  This should now be
working there if you build from the latest CVS.

Gary