I just took a quick glance, and I think that your conditional would be valid if you just remove all of those "string" functions.
As an aside, I just recently worked on some of my first XSLT 2.0 style sheets, and it was very nice to shorten some code that took up way too many lines in 1.0. Have fun!
From: Encoded Archival Description List [mailto:[log in to unmask]] On Behalf Of Michele R Combs
Sent: Friday, June 03, 2011 9:13 AM
To: [log in to unmask]
Subject: XSLT 1.0 => 2.0
Just for fun, I took a quick run at converting our style sheets from XSLT1.0 to XSLT2.0 this week and got the following error:
Error on line 451 of eadcbs6-su1.xsl:
XPTY0004: A sequence of more than one item is not allowed as the first argument of
string() (<head/>, <p/>)
at xsl:call-template name="toc" (file:/G:/LIB/Special%20Collections/Digital%20Projects/EAD/saxon/../styles/eadcbs6-su1.xsl#230)
in built-in template rule
Transformation failed: Run-time errors were reported
Line 451, in context, looks like this:
or string(archdesc/*/accruals/*)"> <= line 451
<a class="toc" href="#adminlink">
I've checked the W3C document at http://www.w3.org/TR/xslt20/#incompatibilities (which, while not impenetrable, is not exactly crystal clear either) and am not sure what the problem is. Surely I can test multiple conditions, so is it a syntax thing?
Librarian for Manuscripts and Archives Processing Special Collections Research Center Syracuse University
[log in to unmask]