RE: [xliff] proposed solutions for CSPRD 138 (Unique Particle Attribution) - validation

From
Yves Savourel <>
Date
2013-12-07T20:44:33+00:00
ID
005801cef38d$20676b70$61364250$@com
Thread
RE: [xliff] proposed solutions for CSPRD 138 (Unique Particle Attribution) - validation
Hi everyone,

Here is a summary of the things I've done to try to resolve our validation issue:

- I've taken the latest schemas from SVN
- removed all references to the modules from the core
- made each module schema as independent as possible
- replaced all ##any by ##other and skip by lax

This with just running XSD validation with the independent schemas give us a good coverage of what can be checked by XSD. The
missing parts are:
a) detecting that attributes that are incorrect or not allowed in each attribute-extension point. 
b) verifying which modules elements are allowed in each element-extension point.

To fix that I created a small XML document that lists all XLIFF elements where extensions or modules are allowed, and for each of
those, listed the allowed modules attributes and/or elements. See the attached modules.xml file for details.
Lynx simply checks that information when it reaches one of the extension point.

So it looks like that validation should be working now: we catch fs:badAttr="value" as well as fs:fs="badValue".

Depending on the type of error you'll get the exception sometimes from the schemas validation (run first), and other times from
Lynx' processing validation.
This should also make things relatively easy to maintain as most of the time only modules.xml needs to be updated when something
changes.

I have also started to synchronize the validation with the latest specification changes.

I haven't updated any schema on SVN, nor updated the location of the extension points (e.g. before or after <unit>/<group>).

I think at some point I'll make a Web page and/or Web service to run the validation online.
For now, the latest version is here: http://okapi.opentag.com/snapshots/okapi-xliffLib_all-platforms_0.21-SNAPSHOT.zip
And there is a Web start version here: http://okapi.opentag.com/webstart/lynx/lynx.jnlp

Cheers,
-yves