Subject: Re: [xsl] XSLT 3.1 that keeps both Saxon EE and HE happy and tokenizes an attribute From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 26 Sep 2024 04:32:05 -0000 |
On Thu, Sep 26, 2024 at 04:21:07AM -0000, Robert Stuart bobstuart@xxxxxxx scripsit: > I have quite a few attributes whose values are space delimited tokens. > Saxon EE C"BBknowsC"BB they are lists of tokens since the schema does have > them a lists so they can be constrained and validated at the XSD > level. 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() > > This feels like it should be obvious and trivial but has been > irritating me for a while now. [snip] HE will never know the type is a sequence type, and EE always will. I'd go with two templates and the use-when attribute with a value of something like contains(system-property('xsl:product-version'),'EE') (with 'HE' for the HE one) though I'd want to check what the actual returned values are. The HE template uses tokenize() and the EE one doesn't, since it's already going to have a sequence of strings. Making this work with Schematron probably requires using a variable and setting the variable value based on an if statement that checks system-property(). -- Graydon -- Graydon Saunders | graydonish@xxxxxxxxxxxx CBCB&s oferCB)ode, CB0isses swCB! mCB&g. -- Deor ("That passed, so may this.")
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT 3.1 that keeps both Saxo, Robert Stuart bobstu | Thread | Re: [xsl] XSLT 3.1 that keeps both , Liam R. E. Quin liam |
[xsl] XSLT 3.1 that keeps both Saxo, Robert Stuart bobstu | Date | Re: [xsl] XSLT 3.1 that keeps both , Liam R. E. Quin liam |
Month |