Re: fn:contains in sequence – P2

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: fn:contains in sequence – P2 | XSLT 2.0

Subject: Re: fn:contains in sequence – P2 | XSLT 2.0
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jun 2021 15:53:23 -0000
Re:   fn:contains in sequence – P2 | XSLT 2.0
Am 24.06.2021 um 16:47 schrieb Fiona Chen anonymousjuly1@xxxxxxxx:
> B B B B However, I am not able to transform the report in XSLT 2.0
> equivalent without MarkLogic cts.
>
> <xsl:template match="SVM">
> <xsl:variable name="classVal" select="class[/xs:decimal/(/@val/) gt
> 0.00]"/>
> <xsl:element name="SVM" namespace="schema://fc.fasset/svm">
> <xsl:comment select="$point-in-time"/>
> <xsl:element name="Negative" namespace="schema://fc.fasset/svm">
> <xsl:comment select="$negative-comment"/>
> <xsl:for-each
> select="classification[/not/(/contains/(descendant::label, $classVal))]">
> <xsl:copy-of select="."/>
> </xsl:for-each>
> </xsl:element>
> </xsl:element>
> </xsl:template>
>
>
> B (Note: The number, position and sequence of the labelled class will
> change depending on the training data. Hard-coded count or position in
> XSLT wouldnbt work.)
>
> B B B B I receive either blank result or Saxon fetal error to that
> effect:A sequence of more than one item is not allowed as the second
> argument of fn:contains()
>

I think the error message is telling you that that the second argument
to the "contains" call, i.e. $classVal is a sequence of more than one item.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.