On Thu, 2024-09-26 at 04:21 +0000, Robert Stuart bobstuart@xxxxxxx
wrote:
>
> tokenize(./@someAttribute) works great in HE but bombs in EE with A
> sequence of more than one item is not allowed as the first argument
> of fn:tokenize()
Right. This is because the schema gives @someAttribute a type
annotation saying it's a list, so it becomes a sequence.
you could use e.g.
if (count(@someAttribute) gt 1) then @someAttribute else
tokenize(@someAttribute)
or have a template that only matches the attribute if it has a type
annotation, and one tha tmatches if it doesn't and tokenizes it, and
use apply-templates.
<xsl:template match=".[. instance of my:listType]">....
Or that's what i think late at night anyway :-)
best
liam
--
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org
|