xQUERY and CSV (text files)
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 2
- Joined: Thu Jul 14, 2005 11:10 pm
xQUERY and CSV (text files)
I have searched and searched and tried Oxygen but to no avail.
I have not been able to just generate any text formats I want from an XML file: ie. CSV, txt, tabbed, etc...
? Is this possible to do with the parsers Oxygen supports
? if so why does the validating keep giving me errors regarding the lack of bracing tags?
? I don't want to waste anyones time - any pointers to tutorials for this kind of thing.
T.
I have not been able to just generate any text formats I want from an XML file: ie. CSV, txt, tabbed, etc...
? Is this possible to do with the parsers Oxygen supports
? if so why does the validating keep giving me errors regarding the lack of bracing tags?
? I don't want to waste anyones time - any pointers to tutorials for this kind of thing.
T.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
It is possible with Saxon 8. The following query
applied to the file
generates the output:
The current version of <oXygen/> does not pass output options to the XQuery transformer yet. A future version will pass them. In this case the effect of
should be that the tags <persons> and </persons> are not serialized in the output, so that the output should be:
Regards,
Sorin
It is possible with Saxon 8. The following query
Code: Select all
declare namespace saxon="http://saxon.sf.net/";
declare option saxon:output "method=text";
<persons>
{
for $person in /personnel/person
return (" ", $person/name/family/text(), " , ", $person/name/given/text())
}
</persons>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<personnel>
<person id="Big.Boss">
<name>
<family>Boss</family>
<given>Big</given>
</name>
<email>chief@oxygenxml.com</email>
<link subordinates="one.worker"/>
</person>
<person id="one.worker">
<name>
<family>Worker</family>
<given>One</given>
</name>
<email>one@oxygenxml.com</email>
<link manager="Big.Boss"/>
</person>
</personnel>
Code: Select all
<persons>
Boss , Big
Worker , One</persons>
Code: Select all
declare option saxon:output "method=text"
should be that the tags <persons> and </persons> are not serialized in the output, so that the output should be:
Code: Select all
Boss , Big
Worker , One
Sorin
Last edited by sorin_ristache on Mon Mar 13, 2006 11:42 am, edited 1 time in total.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: xQUERY and CSV (text files)
Post by sorin_ristache »
Hello again,
Regards,
Sorin
Probably the syntax of your XQuery document is not conformant to the XQuery specification. Can you post a small sample XQuery for which <oXygen/> reports validation errors and specify the XQuery validation engine set in the XQuery preferences (Saxon 8, eXist, Berkeley DB XML) ?tCodex wrote:? if so why does the validating keep giving me errors regarding the lack of bracing tags?
Regards,
Sorin
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