XQuery and Server Sides Includes
-
29-04-2021 - |
Frage
How can I instruct XQuery to copy these SSI directives (HTML comments) from an XQuery file (.xq) to the output html file.
<!--#set var="tab4" value="true" -->
<!--#include virtual="/common/content/header.shtml" -->
I'm using Saxon and I'm getting the following error:
Error on line 2 column 2 of _download.xq:
XPST0003 XQuery syntax error near #...ar="tab4" value="true" --> <!-#:
Unexpected token "!" in path expression
Static error(s) in query
Lösung
XQuery allows you to just insert the comments anywhere you would insert literal elements. Just be aware that they are seen as two separate nodes, and may need a comma in between, and perhaps even parentheses, to make a sequence of them. Depends on where in your code you inserted them.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow