Hello,

I'm trying to output an XForms (XSLTForms) document from a RESTXQ endpoint, but the necessary processing instructions are being serialized in XML comments in the output, e.g.:

<!--?xml-stylesheet type="text/xsl" href="static/xphoneforms/build/xsl/xsltforms.xsl"?-->

 Am I missing something?

XQuery:

xquery version "3.1";

module namespace test = "test";

declare
  %rest:path("/test")
  %rest:GET
  %output:method("xhtml")
function test:home() as document-node() {
 
  document {
    processing-instruction { "xml-stylesheet" } {
        'type="text/xsl" href="static/xphoneforms/build/xsl/xsltforms.xsl"'
    },
    processing-instruction { "xsltforms-options" } { 'debug="no"' },
    processing-instruction { "css-conversion" } { 'no' }
    ,
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms"
          xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:my="test"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <head>
        <title>Test</title>
      </head>
      <body>
        <h1>Placeholder</h1>
      </body>
    </html>
  }
};



--
Tim A. Thompson
Discovery Metadata Librarian
Yale University Library