saxon:octets-to-hexBinary() and saxon:hexBinary-to-string() in Saxon-JS
Added by Graydon Saunders almost 2 years ago
Hello --
It looks like these extension functs are not available in Saxon-JS. (I note that https://www.saxonica.com/html/documentation10/functions/saxon/octets-to-hexBinary.html does say "EE or PE".)
12:51 node % npm view xslt3 version
says 2.5.0
The transform runs fine in PE 11.4 in oXygen, so I'm reasonably sure
Error XPST0017:
Static error in XPath on line 104 in xslt/convertEditPIsToElts.xsl {$temp => saxon:octets-to-hexBinary() => saxon:hexBinary-to-string('UTF8')}: Unknown function Q{http://saxon.sf.net/}octets-to-hexBinary()
is the actual problem.
Would compiling the SEF file with EE provide these functions so that saxon-js could run them?
Thanks! Graydon
Replies (4)
Please register to reply
RE: saxon:octets-to-hexBinary() and saxon:hexBinary-to-string() in Saxon-JS
-
Added by Michael Kay almost 2 years ago
No, sorry, these functions are not available in SaxonJS.
We're planning a whole raft of extension functions in SaxonJS 3, including the EXPath file and binary modules, but we don't have a date for that yet.
If I'm not mistaken the EXPath binary module makes these two functions redundant.
RE: saxon:octets-to-hexBinary() and saxon:hexBinary-to-string() in Saxon-JS
-
Added by Graydon Saunders almost 2 years ago
Thank you!
Good to know I shouldn't try to make that work.
RE: saxon:octets-to-hexBinary() and saxon:hexBinary-to-string() in Saxon-JS
-
Added by Martin Honnen almost 2 years ago
Instead of => saxon:octets-to-hexBinary() => saxon:hexBinary-to-string('UTF8')
you can use => bin:from-octets() => bin:decode-string('UTF-8')
, I think, but of course with SaxonJS, only, once it is supported.
RE: saxon:octets-to-hexBinary() and saxon:hexBinary-to-string() in Saxon-JS
-
Added by Graydon Saunders almost 2 years ago
I can say that in the Saxon-J version, the output looks the same when I replace => saxon:octets-to-hexBinary() => saxon:hexBinary-to-string('UTF8')
with => bin:from-octets() => bin:decode-string('UTF-8')
and the XSpec tests pass. It seems likely you have thought correctly.
And yes, have to wait for the JS version over the in the node context, but this is still getting closer to both environments using the same transform.
Thank you, Martin!
Please register to reply