You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Chuck Paussa <Ch...@systems.dhl.com> on 2002/10/21 22:12:09 UTC

Re: fo validation issue (Latest FO schema)

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 <documentation> element.) I cetainly can't  work on 
anything of that magnitude for a while (months+) since this one catches 
all of the mistakes that my team is likely to make.

If anyone wants to take on the task of extending the schema with 
schematron asserts. Feel free.

Chuck Paussa

 > 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.
 > 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.


Re: fo validation issue (Latest FO schema)

Posted by Oleg Tkachenko <ol...@multiconn.com>.
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 the task of extending the schema with
> schematron asserts. Feel free.

I will. Even if people doesn't want to see validation taken outside from java 
code, I believe it's important to have such kind of service, probably as 
external module or sax filter.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Latest FO schema

Posted by "Peter B. West" <pb...@powerup.com.au>.
Chuck,

Thanks for this.  I noticed that that file has hard tabs, and I assume 
that you are using an editor which allows you to set soft 
interpretations for these.  What setting do you use?  I have stripped 
the TABs, replacing with spaces at stops of 2.  I have also replaced the 
<CR><LF> pairs with LFs.  Does your editor allow you to replace TABs 
with spaces?  Does it allow you to choose a line-ending for the output 
file?  If so, it would be useful if you could produce such a file.  If 
you are using a tab width other than 2, let me know.

I will commit the changed file unless you would prefer I use a different 
tab stop.

Your schema raised another issue for me.  In alt.design, I have a 
configuration file xml-lang.xml.  It has no DTD, but it would be:

<?xml version="1.0" ?>
<!ELEMENT xml-lang countrycodes, languagecodes, scriptcodes>
<!ELEMENT countrycodes country+>
<!ELEMENT country EMPTY>
<!ATTLIST country
   name CDATA #REQUIRED
   code ID #REQUIRED
 >
<!ELEMENT languagecodes language+>
<!ELEMENT language EMPTY>
<!ATTLIST language
   name CDATA #REQUIRED
   code ID #REQUIRED
 >
<!ELEMENT scriptcodes script+>
<!ELEMENT script EMPTY>
<!ATTLIST script
   name CDATA #REQUIRED
   code ID #REQUIRED
 >

Currently, the xml-lang.xml file is processed at startup to produce 
HashMaps for validation.  Not a good idea.  I need to generate an 
appropriate class from the file.  N.B. Not to be used during the normal 
build process, but as a developer tool to generate a new version of the 
class for checkin when changes occur in the relevant standards.  It 
would be useful if we could decide on a common format that you can 
include in your schema and that I can use for code generation.

Peter

Chuck Paussa wrote:
> 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 <documentation> element.) I cetainly can't  work on 
> anything of that magnitude for a while (months+) since this one catches 
> all of the mistakes that my team is likely to make.
> 
> If anyone wants to take on the task of extending the schema with 
> schematron asserts. Feel free.
-- 
Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org