DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28681

[PATCH] Xml output for the SQL task





------- Additional Comments From [EMAIL PROTECTED]  2004-05-05 09:14 -------
> I do have a problem on inventing a new XML dialect
> with no documentation (DTD nor XMLSchema) to express this output.

I've added a DTD inline with the output (also in the new patch).
Since I was at it, in the patch I also moved the method to escape xml in
StringUtils.

<?xml version="1.0" ?>
<!DOCTYPE sqlresults [
  <!ELEMENT sqlresults (headers?, (nest | row)* )>
  <!ELEMENT headers (header)*>
  <!ELEMENT header (#PCDATA)>
  <!ELEMENT nest (row)*>
  <!ATTLIST nest group-by CDATA #REQUIRED
                 value    CDATA #REQUIRED>
  <!ELEMENT row (cell)*>
  <!ELEMENT cell (#PCDATA)>
  <!ATTLIST cell header CDATA #REQUIRED>
]>

> If we want to do do this, we should use a simple well known XML for
> queries and be done with it. 

It's not the query, it's the result in xml... and for that I don't know about
well-known schemas. If someone can point me to a "standard" I'd be happy to
change the element names to follow it.

> If people want something more rich they can
> use XSLT on top of that.

That's exactly what it does, it uses a fixed simple DTD. I had to include
grouping though as doing it by xsl is complicated and resource intensive. The
grouping this task does is as simple as can be.

Maybe I'm missing something...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to