xsl-list
[Top] [All Lists]

Re: [xsl] Schema validation on a function parameter

2018-02-12 12:04:18

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
--~--

<Prev in Thread] Current Thread [Next in Thread>