tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Longman" <glong...@intelligentworks.com>
Subject Error Parsing solved
Date Sat, 01 Feb 2003 14:56:25 GMT
I have come up with a scheme that will give Spindle all the information it
needs to show lots of errors without
changing the SpecParser, or AbstractDocumentParser!

I have a built a custom Xerces parser that attaches the location information
to the DOM nodes via setUserObject().
Each element and attribute will be able to report:

begin line, begin column, end line, end column. As well if an element is
thus:

<foo>
.....
</foo>

the node for foo will contain the boundary info for both the start and the
end tag.

As well, I'm adding a document handler to the parser pipeline that will do
the checks done by the SpecificationParser
(the perl expression stuff). Heck, down the road I may add another handler
to the pipeline that further validates the content, i.e..
checks to see if component X really exists. Something along the lines of
Mindbridge's validator. (Hopefully my stuff can compliment MB's).

It may get to the point where Spindle only needs to use the SpecParser to
create Tapestry objects, everything will be prevalidated.
hmm maybe there should be a switch in the parser that turns off the internal
checking, might add up to a speed improvement - might not though.

And the really cool thing for Tapestry 2.4 support is that the same kind of
validation will be possible in the templates. I have found a parser built on
Xerces that parses HTML and synthesizes missing HTML tags to make the
document well formed.

I'm happy, the sun is shining, 2.4 support in Spindle is coming!

Geoff

Geoffrey Longman
Intelligent Works Inc.




Mime
View raw message