Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] function-available returns false

From: "Manfred Staudinger" <manfred.staudinger@--------->
To:
Date: 5/1/2008 4:55:00 PM
With the stylesheet below Saxon 6.5.5 returns false for
function-available for all xslt and xpath functions. Found nothing
under "Limitations"
http://saxon.sourceforge.net/saxon6.5.5/limitations.html
Any idea?

Regards,

Manfred

XML:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:dr="http://documenta.rudolphina.org/"
   xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>XSLT Availability</title>
   </head>
   <body>
      <h1>XSLT 1.0</h1>
      <dr:available>
         <dr:xslt>
            <dr:functions show="false">
               <dr:f>current</dr:f>
               <dr:f>document</dr:f>
               <dr:f>element-available</dr:f>
               <dr:f>format-number</dr:f>
               <dr:f>function-available</dr:f>
               <dr:f>generate-id</dr:f>
               <dr:f>key</dr:f>
               <dr:f>system-property</dr:f>
               <dr:f>unparsed-entity-uri</dr:f>
            </dr:functions>
         </dr:xslt>
         <dr:xpath>
            <dr:functions show="false">
               <dr:f>last</dr:f>
               <dr:f>position</dr:f>
               <dr:f>count</dr:f>
               <dr:f>id</dr:f>
               <dr:f>local-name</dr:f>
               <dr:f>namespace-uri</dr:f>
               <dr:f>name</dr:f>
               <dr:f>string</dr:f>
               <dr:f>concat</dr:f>
               <dr:f>starts-with</dr:f>
               <dr:f>contains</dr:f>
               <dr:f>substring-before</dr:f>
               <dr:f>substring-after</dr:f>
               <dr:f>substring</dr:f>
               <dr:f>string-length</dr:f>
               <dr:f>normalize-space</dr:f>
               <dr:f>translate</dr:f>
               <dr:f>boolean</dr:f>
               <dr:f>not</dr:f>
               <dr:f>true</dr:f>
               <dr:f>false</dr:f>
               <dr:f>lang</dr:f>
               <dr:f>number</dr:f>
               <dr:f>sum</dr:f>
               <dr:f>floor</dr:f>
               <dr:f>ceiling</dr:f>
               <dr:f>round</dr:f>
            </dr:functions>
         </dr:xpath>
      </dr:available>
   </body>
</html>

XSLT:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   xmlns:dr="http://documenta.rudolphina.org/"
   exclude-result-prefixes="xhtml dr"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
   encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/">
   <xsl:apply-templates/>
</xsl:template>
<xsl:template match="*">
   <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
</xsl:template>
<xsl:template match="@*|text()|comment()|xhtml:br">
   <xsl:copy/>
</xsl:template>
<xsl:template match="dr:available">
   <ul xmlns="http://www.w3.org/1999/xhtml">
      <xsl:apply-templates select="@*|node()"/>
   </ul>
</xsl:template>
<xsl:template match="dr:available/*">
   <xsl:apply-templates select="@*|node()"/>
</xsl:template>

<xsl:template match="dr:available/*/*">
   <xsl:text>&#10;</xsl:text>
   <li xmlns="http://www.w3.org/1999/xhtml">
      <xsl:value-of select="concat(local-name(ancestor::*[1]), ' ',
local-name(.), ' available')"/>
      <ul xmlns="http://www.w3.org/1999/xhtml">
         <xsl:apply-templates select="node()">
            <xsl:sort select="."/>
            <xsl:with-param name="show" select="@show='true'"/>
         </xsl:apply-templates>
      </ul>
   </li>
</xsl:template>
<xsl:template match="dr:f">
<xsl:param name="show"/>
   <xsl:if test="function-available(string(.))=$show">
      <xsl:text>&#10;   </xsl:text>
      <li xmlns="http://www.w3.org/1999/xhtml">
         <xsl:value-of select="concat(., ': ', function-available(string(.)))"/>
      </li>
   </xsl:if>
</xsl:template>

</xsl:stylesheet>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent