John McNally wrote:
>
> A problem related to the current setup is how to get the <DOCTYPE> tag as
> the first line in an html document. I am not as comfortable with ECS
> internals as others and have not looked at all at how xml is being handled,
> so I was reluctant to do go very far from the current arrangement to get
> doctype working. I could not come up with a way to get it added as Document
> is a wrapper around an html object (I thought after seeing this that
> Document was not xml related). It seemed it would be necessary add lots of
> code to the output method instead of just calling html.output(). Hopefully,
> your solution to your xml concerns could help with my html problem?
>
Bingo. Right now, if you do
<code>
Document doc = new Document();
System.out.println(doc.toString());
</code>
you get:
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
This is because Document is an object built specifically to HTML. What
I am proposing is an object XMLDocument that doesn't assume you are
using XML. In fact, it doesn't add any "surrounding" elements at all,
because there are elements that take place before the root element in
XML. So yes, it will solve your problem.
-Brett
--
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]