T5: XML declaration is missing from rendered page. Any workrounds?

2007-06-25 Thread David Peterson

I'm using the latest 5.0.5-SNAPSHOT built directly from the Subversion
repository.

I have a simple page class Atom that renders an atom feed (using the @Meta
to change the response content type). It's almost perfect, except that the
output is missing the XML declaration at the top of the response and the
Atom namespace.

I want this:

?xml version=1.0 encoding=UTF-8?
feed xmlns=http://www.w3.org/2005/Atom;.../feed

But I'm getting this:

feed.../feed

I had a look in the Tapestry source code and there's a TODO in the
org.apache.tapestry.dom.Document class:
 // TODO: XML declaration, plus lead-in comments, directives.
This comment doesn't mention root element namespaces. I'm puzzled why they
disappear. A bug I think.

Can anybody think of a workround for these problems, in the mean-time? Other
than writing the entire stream out by hand? (I want to use Tapestry page
rendering, if I possibly can).

Thanks
David

P.S. Howard, do you want me to log these issues in JIRA?


Re: T5: XML declaration is missing from rendered page. Any workrounds?

2007-06-25 Thread Howard Lewis Ship

Absolutely, log this in JIRA.  Otherwise it just gets lost.

On 6/25/07, David Peterson [EMAIL PROTECTED] wrote:

I'm using the latest 5.0.5-SNAPSHOT built directly from the Subversion
repository.

I have a simple page class Atom that renders an atom feed (using the @Meta
to change the response content type). It's almost perfect, except that the
output is missing the XML declaration at the top of the response and the
Atom namespace.

I want this:

?xml version=1.0 encoding=UTF-8?
feed xmlns=http://www.w3.org/2005/Atom;.../feed

But I'm getting this:

feed.../feed

I had a look in the Tapestry source code and there's a TODO in the
org.apache.tapestry.dom.Document class:
  // TODO: XML declaration, plus lead-in comments, directives.
This comment doesn't mention root element namespaces. I'm puzzled why they
disappear. A bug I think.

Can anybody think of a workround for these problems, in the mean-time? Other
than writing the entire stream out by hand? (I want to use Tapestry page
rendering, if I possibly can).

Thanks
David

P.S. Howard, do you want me to log these issues in JIRA?




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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