- From: Yves Savourel <ysavourel@enlaso.com>
- Date: Fri, 6 Jul 2012 11:19:05 +0200
- To: <public-multilingualweb-lt@w3.org>
- CC: "'Fredrik Estreen'" <Fredrik.Estreen@lionbridge.com>
Hi Felix, all, > Here is ACTION-159 about this. First an > example in Schematron about display length. > > <schema xmlns="http://purl.oclc.org/dsdl/schematron"> > ... > > 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. - 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. 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. Cheers, -yves
Received on Friday, 6 July 2012 09:19:36 UTC