Hello!

I've been thinking about fop users most confused questions and then about general solution for detection input tree related errors and finally I arrived at the old idea (raised already on the list) of input tree validation.
Indeed, at the moment fop doesn't validate entire input tree, but instead some formatting object handlers checks some stuff like parent/child names etc during fo tree building. This approach has some advantages: it's probably more cheap in terms of streaming at the state it is now; it keeps within sax processing boundaries, but:
o full implementation of such validation could be quite complex task hence source of new bugs and likely to slow down processing,
o I doubt such local validation can fully handle a very peculiar xsl-fo syntax,
o it's very sparse and there is no way to turn it off

Hence my proposition - lets create (potentially optional?) validation module with duties to validate input tree and report errors/warnings/suggestions in human readable (or even localizable) form and lets set free other modules from validation concerns. I believe it could be much more robust and easy to implement and maintain approach.

Here is my thoughts about possible validation implementation:
Usual xml validation against dtd or schema (and we have XEP as an example - they does validate against self-made xsl-fo dtd). Well, but xsl-fo is such a beast that cannot be expressed in dtd and even in xml schema as it defines a lot of cooccurence constraints like mutually exclusive internal-destination and external-destination of fo:basic-link. And dtd/schema validation error messages are far from poor user understanding, so schematron come into my mind. Why not? It's quite simple to create schematron schema for xsl-fo, define understandable asserts, then compile it into xsl stylesheet (or even into java class using xalan's xsltc) during fop building and use it as optional sax filter at run-rime.

Comments?

--
Oleg Tkachenko
eXperanto team
Multiconn International, Israel


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

Reply via email to