On 12/13/06, Kent Tong <[EMAIL PROTECTED]> wrote:

Hi,

At present when parsing a template, the SAXParser will try to resolve the
DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
  <html ...>



This will work only when the computer is online (and it will quite some
time). I think we should bundle the standard DTDs (eg, the xthml ones)
in a catalog, use the XMLCatalogResolver and configure it to load that
catalog along with catalogs specified by the app developer using
@Contribute. What do you think?



Yep, this is the plan. Common DTDs should be packaged in the tapestry JARs,
much like the Tapestry 4 DTDs.

A problem I've been struggling with is that the use of XML parser is that
documents have to be well formed (that's not a minus) and they
have to have a DTD if the document contains any entities.  That last part is
a problem for non-XML HTML.  And a XML parser
can't make sense of the SGML DTDs for HTML.

Interestingly,the new markup stuff is flexible enough to generate SGML HTML
output (i.e., <br> not <br/>, etc.).  However, I haven't fully filled in the
details about outputting a <!DOCTYPE> or setting the MIME content type.
I'll shortly be adding meta data to classes (@Meta and some methods to
ComponentModel) which will be the primary way this is generated.

BTW, SAXParser seems to have been deprecated in favor of XMLReader,
should we migrate accordingly?



Sure, I must have been sticking to what I knew.  Changing from SAXParser to
XMLReader should be very easy.  The new interfaces are better (but not
perfect).  I have a bunch of features to add to the template parser, I may
work on that on the flight home.


--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT )


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




--
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

Reply via email to