Support #3213
closedSystem function document#1 is not available with this host-language/version/license
0%
Description
When evaluating the following expression:
'not(@typeCode) or count(distinct-values(tokenize(normalize-space(@typeCode),' '))) = count(distinct-values(document('include/voc-1.2.208.176.7.1.11.1-DYNAMIC.xml')//valueSet/conceptList/concept[@code = distinct-values(tokenize(normalize-space(@typeCode),' '))]/@code))' with the following variables: {$theAttCheck=distinct-values(document('include/voc-1.2.208.176.7.1.11.1-DYNAMIC.xml')//valueSet/conceptList/concept[@code = distinct-values(tokenize(normalize-space(@typeCode),' '))]/@code), $theAttValue=distinct-values(tokenize(normalize-space(@typeCode),' '))}
- I get the following error:
net.sf.saxon.trans.XPathException: System function document#1 is not available with this host-language/version/license
at net.sf.saxon.expr.parser.XPathParser.grumble(XPathParser.java:282)
at net.sf.saxon.expr.parser.XPathParser.parseFunctionCall(XPathParser.java:3104)
at net.sf.saxon.expr.parser.XPathParser.parseBasicStep(XPathParser.java:2011)
at net.sf.saxon.expr.parser.XPathParser.parseStepExpression(XPathParser.java:1892)
...
I'm using Saxon-HE in a Java environment (JRE-8) and I've also tried the EE and CE version - which gives the same error. Is this the intended behavior? Is it to be supported in other versions or languages?
Updated by Michael Kay over 7 years ago
The document() function is defined in XSLT as an XSLT-specific extension to the XPath function library. It is therefore only available in XPath expressions within an XSLT stylesheet. In other contexts you should use the very similar doc() function.
Please register to edit this issue