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

Error: sequence of more than one item not allowed

Subject: Error: sequence of more than one item not allowed
From: "Mark" <mark@xxxxxxxxxxxx>
Date: Tue, 4 Oct 2011 02:42:21 -0700
 Error: sequence of more than one item not allowed
Of the two nearly parallel statements below, (2) raises the error: "Sequence of more than one item not allowed as the second operand of 'eq'."

(1) groups-by the attribute ($format) and (2) by all the not ($format) attributes found in <Formats>. My thinking was that in (2) the 'group-by' would return a current-group() resolved to a single attribute by the <xsl:for-each select"current()> statement, but if so, I am clearly addressing that single attribute incorrectly. On the other hand, no error is reported when in (2) the group-by="@*[not(name(.)=$format)] resolves to a single attribute. Can I specify the <xsl:if test="$item eq ???"/> to avoid this error in (2) and still test against all of the not($format) attributes?

Thanks,
Mark

(1)
<xsl:for-each-group select="../../Stamp/Formats" group-by="@*[name(.)=$format]">
<xsl:for-each select="current-group()">
<xsl:if test="$item eq @*[name(.)=$format]"> <!--No error -->


(2)
<xsl:for-each-group select="../../Stamp/Formats" group-by="@*[not(name(.)=$format)]">
<xsl:for-each select="current-group()">
<xsl:if test="$item eq @*[not(name(.)=$format)]"> <!-- Error -->


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.