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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--