You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Geoff Longman <gl...@intelligentworks.com> on 2003/02/01 15:56:25 UTC

Error Parsing solved

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.