Re: [ACTION-160] (related to [ACTION-135] too) Summarize specialRequirements

Hi Yves, all,

2012/7/6 Yves Savourel <>

> Hi Felix, all,
> > Here is ACTION-159 about this. First an
> > example in Schematron about display length.
> >
> > <schema xmlns="">
> > ...
> >
> > I think the counterPart as a global rule would be
> > <itsx:lengthConstraintRule select="//gui" length="100"/>
> >
> > For both implementations, you will need an XPath processor.
> > ...
> > As Yves pointed out, once the content is taken out
> > of the original file and then part of XLIFF, checking
> > against the XML Schema constraint doesn't work
> > anymore since the XLIFF schema doesn't know about
> > the constraint.
> > For Schematron I think this is different, since you
> > can apply the schema easily to many contexts,
> > by just modifying the "rule" element
> > <rule context="gui | trans-unit">
> Thanks for the example.
> I think the Schematron approach is fine in few cases. But it has
> shortcomings, for example:
> - It mixes executing the check with storing the info to check. Separating
> the max-size info from the text is cumbersome.

No need to separate the check from the file - you can add a link to a
schematron file from the file to be checked, just like with ITS linked
global rules.

> - It works with XML only. Interactive checks are more efficient than batch
> process for this (checks as you type the translation), and that happens in
> tools not on XML files.

Isn't it the case for all data categories in ITS 1.0 and 2.0 that they only
work in a markup world? After all global rules rely on XPath.

> One could replace Schematron with Perl and write a script that would do
> the same check and could be adapted to more than XML. But I think that's
> not what we are looking for.
> The Schematron or XSD approach also don't handle the encoding aspect. If
> the field is in UTF-8 Japanese text will have to count less code-points
> than Slovenian text.
> IMO the goal is to provide the information about the maximum size, so it
> can be passed on to whatever system is used to do the
> translation/validation.

Mm ... not sure:  assuming you have a global rule like
<itsx:lengthConstraintRule select="//gui" length="100"/>
the system using that rule needs to have at least a pre-process that's in
the HTML5/XML world: it needs to process XPath.

I think Schematron has also the benefit that you can do general constraint
checks - basically everything that can be expressed in an XPath
expressions. Advertising tool makers to use that mechanism instead of
inventing (potentially a set of) several new ones (length check, character
restriction, languages allowed in the process etc.) might actually lower
implementation efforts - you buy the swiss army knife just once :)



> Cheers,
> -yves

Felix Sasaki
DFKI / W3C Fellow

Received on Friday, 6 July 2012 10:07:37 UTC