XQuery not producing doctype declaration
Issues related to W3C XQuery.
-
- Posts: 18
- Joined: Thu Mar 16, 2017 8:44 pm
XQuery not producing doctype declaration
I have configured an XQJ connection configured to a BaseX server running locally. When I run the following code block, the XML and doctype declarations do not appear in the output. Running the same query in the BaseX GUI, I do produce both. Is there a way to generate these in my output via oXygen?
Code: Select all
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "xml";
declare option output:omit-xml-declaration "no";
declare option output:indent "yes";
declare option output:doctype-public "-//USP//DTD DITA Doc Std//EN";
declare option output:doctype-system "docstd_shell.dtd";
<docstd docclass="monograph-redesign" id="chapdep" xml:lang="en-US">
<title>XREF Extract</title>
{for $parent in collection('USP41-Prod-Export')//*[@testmethod='Y']
let $root := $parent/ancestor::node()[@docclass]
for $xref in $parent//xref[contains(@href, 'GUID-05F1D608-6135-4A21-B446-EE13FB4990B9')]
return
<docstd>
<docstd>
<title>{$root/data(@id)} - {$root/title/node()}</title>
<stdbody>
<p>{$xref}</p>
</stdbody>
</docstd>
<docstd id="before{$parent/@id}">{$parent}</docstd>
<docstd id="after{$parent/@id}">{$parent}</docstd>
</docstd>
}
</docstd>
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XQuery not producing doctype declaration
Hi,
Unfortunately XQJ transformations support only XQuery 1.0. This is a limitation of the XQJ API.
I believe the problem is that the serialization parameters have only been standardized in XQuery 3.0/3.1. Note that the namespace http://www.w3.org/2010/xslt-xquery-serialization points to a XSLT and XQuery Serialization 3.1 Namespace Document. So they would not work with an XQuery 1.0 transformation (determined by the use of XQJ).
Regards,
Adrian
Unfortunately XQJ transformations support only XQuery 1.0. This is a limitation of the XQJ API.
I believe the problem is that the serialization parameters have only been standardized in XQuery 3.0/3.1. Note that the namespace http://www.w3.org/2010/xslt-xquery-serialization points to a XSLT and XQuery Serialization 3.1 Namespace Document. So they would not work with an XQuery 1.0 transformation (determined by the use of XQJ).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 18
- Joined: Thu Mar 16, 2017 8:44 pm
Re: XQuery not producing doctype declaration
Oh that's quite unfortunate. Is there no way to generate the doctype declaration? I've even tried to pass it through XSL using the BaseX transform function, which also works in BaseX, but not in O2.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XQuery not producing doctype declaration
No, AFAIK it's not possible as long as the output is serialized by the XQJ transformation. It doesn't mater how you process it before, it's the serialization that must support this.Is there no way to generate the doctype declaration?
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service