> If you do this a lot you could also try
>
> <xsl:function name="my:validate" as="element(*, xs:anyType)">
> <xsl:param name="e" as="element()"/>
> <xsl:variable name="e" as="schema-element(*, xs:anyType)">
> <xsl:copy-of select="$e" validation="strict"/>
> </xsl:variable>
> </xsl:function>
>
I got muddled there, I removed the xsl:sequence instruction because the
variable isn't needed, but forgot to remove the variable. I intended to write
> <xsl:function name="my:validate" as="element(*, xs:anyType)">
> <xsl:param name="e" as="element()"/>
> <xsl:copy-of select="$e" validation="strict"/>
> </xsl:function>
Michael Kay
Saxonica
|