Link to home
Start Free TrialLog in
Avatar of happytree12friend
happytree12friend

asked on

How to make an XML declaration in xQuery and how to properly and how to reference it to a DTD?

How can i generate the output example from below by using xQuery?

Hints: by using unescaped-data

I would like to know the solution of how to use the unescaped-data for the xml declaration and the way to generate the reference to a DTD. Thank You.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE name SYSTEM "testing.dtd">

Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Doctypes are a serialisation issue in XQuery and only supported through extensions.
Which XQuery processor are you using?
SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you might find this interesting
http://www.saxonica.com/documentation/using-xquery/extensions.xml

>Hints: by using unescaped-data
this actually only makes sense when you are dealing with a bunch of parameter entities in the internal subset of the DTD
that would be a tricky beast. Then I surely need to know which XQuery engine you are using
Avatar of happytree12friend
happytree12friend

ASKER

Currently i am using the kawa-1.9.1.jar to generate the xml output is there any possible solution for that? Thank You
Qexo (kawa)  is only a partial XQuery implementation.
I don't have a clue about its possibilities regarding serialisation.
As I suggested, check its manual

Why do you use Qexo? Is it mandated for a reason?
And where did you get the "hint" from

Is this homework?
If it is, please check EE regulations, and check the kawa manual yourself.
Enough new hints in this question then
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How to defined XML declaration with xq?
And how to achieved the references DTD via kawa command line?
I execute my queries using the open-source Kawa system.

i have to include:
1. the proper XML declaration <?xml version="1.0" encoding="ISO-8859-1" ?> and
2. the reference to the DTD testing.dtd

http://www.gnu.org/software/kawa/Options.html

i have no idea to generate the first two line "XML declaration and reference DTD"...
anyone know? Thanksss....
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this is not an assignment...my friend ask me to do so...
i solve the xquery part...but don't know how to solve the first two line declaration...
thanks anyway~
well, it is all there to solve it.
welcome
why do you ask in the first place then
Question is answered completely, so I have to object against your request
made a copying error
here is the correct one

assist: http:#a35779316
assist: http:#a35783588
accept: http:#a35785001
All,
 
Following an 'Objection' by Gertone (at https://www.experts-exchange.com/questions/27045940/28-May-11-03-Automated-Request-for-Review-Objection-to-Delete-Q-27043618.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator