|
nk4um User
Posts: 89
|
2008-03-09T09:58:20.000ZMarch 9, 2008 09:58
|
|
nk4um User
Posts: 89
|
Yes, there an error in the example on that page. The document() function is a XSLT2 specific wrapper around the general XPath2
doc() function, see http://www.w3.org/TR/xslt20/#documentXQuery doesn''t have a special wrapper function, but you just use the doc() function: http://www.w3.org/TR/xpath-functions/#func-docSo the example on http://www.w3.org/TR/xpath-functions/#func-docshould be
<xquery> let $operand := doc("ffcpl:/lear.xml")/PLAY/ACT[1]/SCENE[1] return <SPEECHES> {$operand//SPEECH[SPEAKER=''GLOUCESTER'']} </SPEECHES> </xquery>
|
Hope this helps, Menzo PS: By the way, this section of the forum is meant for discussion on the forum application. The ''Solutions Developer'' section
of the forum would be a better place to post these kind of questions.
|
|
nk4um User
Posts: 1
|
Hi,
When trying to operate the xqeury function as shown in the tutorial (http://localhost:1060/book/developerreference/doc_ura_xquery) I get the following error:
net.sf.saxon.trans.StaticError XQuery static error in #....lear.xml") return ;#: Cannot use the document() function in a non-XSLT context
|