Print

Print


On 26 Aug 2010, at 23:07, Wendell Piez wrote:
> <xsl:function name="v:fetch-delSpan" as="element(delSpan)?"/>
>   <xsl:param name="n" as="node()"/>
>   <!-- del will be the most recent delSpan milestone -->
>   <xsl:variable name="del" select="$n/preceding::delSpan[1]"/>
>   <!-- $del/id(@spanTo) will be its end anchor -->
>   <!-- return $del if its end anchor appears after the argument node -->
>   <xsl:sequence select="$del[id(@spanTo) >> $n]"/>
> </xsl:function>


Clever. I like it.

Does the test work if you call it when sitting on (say) a <p> which
_contains_ the @spanTo'ed  elements? I confess to never having
seen the >> operator before.
--
Sebastian Rahtz      
Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

Sólo le pido a Dios
que el futuro no me sea indiferente