qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Canonical XML Output - possible bug?


From: Per Bothner
Subject: Re: [Qexo-general] Canonical XML Output - possible bug?
Date: Wed, 30 Jul 2003 22:17:29 -0700
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030612

Craig Munday wrote:

I'm having trouble getting Qexo to produce canonical XML output.  Even
though I use the option --output-format xml I still see end tags formatted
as <empty-tag/>.

I htink it is reasonable to follow the guidelines in the "XSLT 2.0 and XQuery 1.0 Serialization" draft. So --output-format should output according to XML Output Method. I don't see anything there that says the output should be canonical. However, I think it is reasonable.

I think --output-format xhtml is a good default because it is generally most useful.

I had a look in the XMLPrinter.java class and noticed that the endGroup()
method will produce canonical output if the data member canonicalize is true
(which is the default) and htmlCompat is false.  As it happens htmlCompat is
initialised to true, and their no code to set this to false.

It should probably be initialized to false.

In addition, the getOutputConsumer method in XQuery.java should be modified, probably to return XMLPrinter.make(out, "xhtml"). That way the default remains xhtml - but we can override it.

Perhaps you could try this? (I'm in the middle of a major er-working on path expression, so hopefully Qexo will have a correct and more complete implementation "soon".)
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]