If you are doing a lot of work that involves using XPath sequences in your emml, watch out for a string type comparison error that you might get when say using <if> to compare a value in a sequence with a string literal.
I've been doing a bit of work using sequences and had this error come up a couple of times recently: Cannot compare java:net.sf.saxon.om.FastStringBuffer to xs:string when doing something like this in a script:
<if condition="$fieldNameSeq[1] =''">
It's easy to get around and if you are coding for safety you might want to cast the sequence item as a string before doing the comparison (e.g. <if condition="xs:string($fieldNameSeq[1]) =''"> )
Hi mashers,
If you are doing a lot of work that involves using XPath sequences in your emml, watch out for a string type comparison error that you might get when say using <if> to compare a value in a sequence with a string literal.
I've been doing a bit of work using sequences and had this error come up a couple of times recently: Cannot compare java:net.sf.saxon.om.FastStringBuffer to xs:string when doing something like this in a script:
It's easy to get around and if you are coding for safety you might want to cast the sequence item as a string before doing the comparison (e.g. <if condition="xs:string($fieldNameSeq[1]) =''"> )
Cheers,
Innes