If you are on the ECS CVS list, you saw recent checkins of XMLDocument
(and a mod to PI.java). If you aren't on the list, you need to be (come
on, you're developers!) ;-)
In any case, the first revision of org.apache.ecs.xml.XMLDocument is in
place. This allows the handling of an XML prolog, which was
previously... difficult... because of the way a Document is based on the
premise that there is always an enclosing element (like <html>) while in
XML there is not. There is a root element, plus several other things
(in the prolog) that in ECS terms are also elements, equally at the top.
Take a look, it should help a lot (I am using it for a missin-critical
project in conjunction with Cocoon, it makes things _soooo_ easy). In
any case, I am still adding features, so please coordinate with me on
any proposed changes so we don't step on each other's toes. I still
plan to add:
1) DOCTYPE declaration
2) Schema support *
3) namespace support *
4) Explicit methods for adding Cocoon processing instructions such as
cocoon-process, cocoon:format
5) Anything the Cocoon guys think of - I am posting this to them as well
(sorry, I know that's bad... )
* These can be done now, but it is tied to the root element, instead of
the document, which is not really the spirit of the spec.
There is a addStylesheet() method (add, not set, there can be more than
one),
and constructors for handling versioning, setting the document to
standalone, etc.
There is a generic addToProlog() that handles anything else I haven't
coded yet. Take a look, if you are generating XML from Java I think you
will really like it, I am already hooked and got rid of all my
hard-coded XML in producers... plus I can return XML (elements) from
methods instead of StringBuffers (or for you memory hogs, Strings) and
easily handle serialization and other nice things b/c of Hashtable. If
this doesn't mean anything to you, dive into ECS! It really rocks ;-)
-Brett
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]