[Petal] Re: Petal requires invalid XHTML documents

Paul Arzul patricka at mkdoc.com
Thu Oct 9 16:02:06 BST 2003


On Wed 08-Oct-2003 at 07:55:46PM -0400, William McKee wrote:
> On Wed, Oct 08, 2003 at 11:46:49PM +0100, patricka at mkdoc.com wrote:
> > there are two levels of validation. "well-formed", means all elements are 
> > paired (a requirement of xml). strong validation further checks your 
> > document against it's grammar (dtd or schema). 
> > 
> > (the w3 validator does strong dtd based validation. i don't know of any 
> > schema validators.) 
> 
> Patrick,
> 
> Thanks for the clarification. It's probably not detrimental that my
> Petal templates not be valid; it just makes it a bit more challenging
> for my designers who will need to know the difference.

you can ensure that your petal templates are well-formed (i use
xmllint).

you can also run your petal *output* through a strong validator.

it is a bugbear, but as namespace aware validators and language grammars
mature, you should be able to validate your templates straight-up.


> One of the reasons I used the w3 validation service is because Petal
> does not report the reason a document is well-formed.

yes -- error reporting is a known issue. i think the problem is that
XML::Parser doesn't return enough information for petal to report
line/column numbers. (source documents are "read" into a tree structure
which bare no resemblance to the template.) :(


> this is even possible, but it would be at the top of my wish list for
> future features!

ditto.

- p



More information about the Petal mailing list