EXSLT - exsl:object-type - Use Case 1

Category: example
XML Definition: exsl.object-type.xml
Function or Template: function

Use Case

Source (view)

<doc />

Stylesheet (view)

<!--  Test exslt:object-type  -->
<xsl:variable name="tree">
   <a>
      <b>
         <c>
            <d />
         </c>
      </b>
   </a>
</xsl:variable>
<xsl:variable name="string"
              select="'fred'" />
<xsl:variable name="number"
              select="93.7" />
<xsl:variable name="boolean"
              select="true()" />
<xsl:variable name="node-set"
              select="//*" />
<xsl:template match="/">
   <out>
:
          <xsl:value-of select="exslt:object-type($string)" />
;
          <xsl:value-of select="exslt:object-type($number)" />
;
          <xsl:value-of select="exslt:object-type($boolean)" />
;
          <xsl:value-of select="exslt:object-type($node-set)" />
;
          <xsl:value-of select="exslt:object-type($tree)" />
;
          <xsl:if test="function-available('saxon:expression')"
              xmlns:saxon="http://icl.com/saxon">
         <xsl:value-of select="exslt:object-type(saxon:expression('item'))" />
      </xsl:if>
;                    
  
   </out>
</xsl:template>

Result (view)

<out xmlns:exslt="http://exslt.org/common">:
    string;
    number;
    boolean;
    node-set;
    RTF;
    external;                    
  </out>

Change History

Previous Version: ..NaN.html

VersionModifiedByDetails
12001-04-28Mike Kay

Tests functionality of exsl:object-type().

http://www.exslt.org/exsl/functions/object-type/exsl.object-type.use-case.1.html last modified 2001-04-28