Re: fo validation issue

2002-11-21 Thread Oleg Tkachenko
Peter B. West wrote: I like pull parsing model in general, but how do you manage with not such strict content model as fo:root have, e.g. fo:block with (#PCDATA|%inline;|%block;)* ? How about: FoXMLEvent ev = expectStartElement (FObjectSets.normalPcdataBlockInlineSet,

Re: fo validation issue

2002-11-21 Thread Peter B. West
Oleg Tkachenko wrote: Peter B. West wrote: I like pull parsing model in general, but how do you manage with not such strict content model as fo:root have, e.g. fo:block with (#PCDATA|%inline;|%block;)* ? How about: FoXMLEvent ev = expectStartElement

Re: fo validation issue

2002-11-20 Thread Peter B. West
Oleg Tkachenko wrote: I like pull parsing model in general, but how do you manage with not such strict content model as fo:root have, e.g. fo:block with (#PCDATA|%inline;|%block;)* ? Oleg, How about: /** * Expect that the next element will be a STARTELEMENT for one of the * flow objects

Re: fo validation issue (Latest FO schema)

2002-10-22 Thread Oleg Tkachenko
Chuck Paussa wrote: I believe that the schematron folks are working on a schematron validator that works as an extension to the schema It's done already, schematron schema can be embedded into xml schema. This actually allows double validation against both schemas. If anyone wants to take on

Re: fo validation issue

2002-10-22 Thread Oleg Tkachenko
Peter B. West wrote: BALI: In Memoriam In a pull model, as distinct from the peephole processing model encouraged by SAX, this is easy, because you know where you are at all times; e.g., whether you are within an fo:flow, or more specifically, whether you are descending within an out-of-line

Re: fo validation issue

2002-10-22 Thread Peter B. West
Oleg, It's not a question of being a better way to validate, per se. What I'm saying is that it is a better way to process complex XML of fixed structure. The ability to validate is a side-effect of an explicit top-down processing structure, which effectively allows you to read the

Re: fo validation issue (Latest FO schema)

2002-10-21 Thread Chuck Paussa
Oleg and Peter, Here's the latest iteration of the fo schema. Could someone commit it? The only change is to allow % in length attributes. I believe that the schematron folks are working on a schematron validator that works as an extension to the schema (By adding schematron extensions to the

Re: fo validation issue

2002-10-20 Thread Oleg Tkachenko
Peter B. West wrote: I don't know schematron, so we may be talking at cross-purposes here. Well, schematron is extremely simple while powerful rule-based schema language, see the overview [1]. I'd say if you know xslt and xpath, you know schematron. For example, consider the following xsl

Re: fo validation issue

2002-10-20 Thread Peter B. West
BALI: In Memoriam Oleg Tkachenko wrote: ... Well, schematron is extremely simple while powerful rule-based schema language, see the overview [1]. I'd say if you know xslt and xpath, you know schematron. For example, consider the following xsl constraint: It is an error if the fo:footnote

Re: fo validation issue

2002-10-20 Thread J.Pietschmann
Peter B. West wrote: In a pull model, as distinct from the peephole processing model encouraged by SAX, this is easy, because you know where you are at all times; e.g., whether you are within an fo:flow, or more specifically, whether you are descending within an out-of-line formatting object.

Re: fo validation issue

2002-10-19 Thread Peter B. West
Oleg, I don't know schematron, so we may be talking at cross-purposes here. The approach I have taken in the alt-design is to change from push model processing to pull model. In a push model, the focus of processing is the individual parsing event. When such an event occurs, all of the