[xsl] [XSLT 3.0]

Subject: [xsl] [XSLT 3.0]
From: sean@xxxxxxxxxxxxxxxxx
Date: Wed, 31 Oct 2012 19:32:28 -0600
Suppose that $state is a sequence which contains, among other things, at least one function item with signature...

function(element(square)*) as element(square)*

Which is the correct and safe way to store a reference to this function in a variable?

Is it OPTION A?

    <xsl:variable name="compute-possible-moves"
         select="$state[. instance of function(*)][1]"
         as="function(element(square)*) as element(square)*">

... OR OPTION B?

<xsl:variable name="compute-possible-moves"
select="$state[. instance of function(*)][1]
treat as function(element(square)*) as element(square)*"">


... OR OPTION C?

<xsl:variable name="compute-possible-moves"
select="$state[. instance of function(*)][1]
treat as function(element(square)*) as element(square)*"
as="function(element(square)*) as element(square)*">


My best estimate at the moment, would be option A, but I am not really sure about it.


Faithfully, Sean B. Durkin

Current Thread