Xquery - Output DocType
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 7
- Joined: Thu Mar 06, 2014 9:14 pm
Xquery - Output DocType
Hi all,
I have an xquery file (.xql) that I use to generate an XML table via an xquery module (.xqm).
The module contains a function that generates a table similar to this:
I retrieve this table in the .xql file.
Now, I would like to add a doctype on top of that table, to look like this:
Note that I use xquery 3.0. I found that I should be able to output the doctype by declaring an option on top of the .xql file (right below 'xquery version "3.0";') like this:
I tried this both in the .xql and .xqm files, without success.
Hard-coding the doctype in the .xqm doesn't work either.
Does any of you have an idea for this?
Thanks in advance,
Jonathan
I have an xquery file (.xql) that I use to generate an XML table via an xquery module (.xqm).
The module contains a function that generates a table similar to this:
Code: Select all
<Doctype>
<Table>
<Row>
<Entry>
</Entry>
</Row>
</Table>
</Doctype>
Now, I would like to add a doctype on top of that table, to look like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Doctype PUBLIC "my-doctype-public" "my-doctype.dtd">
<Doctype>
...
</Doctype>
Code: Select all
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "xml";
declare option output:media-type "text/xml";
declare option output:omit-xml-declaration "no";
declare option output:indent "yes";
declare option output:doctype-public "my-doctype-public";
declare option output:doctype-system "my-doctype.dtd";
Hard-coding the doctype in the .xqm doesn't work either.
Does any of you have an idea for this?
Thanks in advance,
Jonathan
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Xquery - Output DocType
Hi,
What XQuery engine are you using for this (eXist, Saxon XQuery) and with what version of Oxygen?
Regards,
Adrian
What XQuery engine are you using for this (eXist, Saxon XQuery) and with what version of Oxygen?
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: 7
- Joined: Thu Mar 06, 2014 9:14 pm
Re: Xquery - Output DocType
Hi Adrian,
I use eXist 2.1 for this application. Via the eXide dashboard, I just run the "Run" command and get the output in the "XML Output" console, which also is on the Dashboard.
I don't use oXygen here.
I use eXist 2.1 for this application. Via the eXide dashboard, I just run the "Run" command and get the output in the "XML Output" console, which also is on the Dashboard.
I don't use oXygen here.
Return to “General XML Questions”
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