
On 11/01/2016 14:32, Jirka Kosek wrote:
On 11.1.2016 14:59, Tony Graham wrote:
Currently, for the Japanese version of 'focheck' [1], I'm using a patched version [2] of the open source OmegaT translation memory tool to get whole Schematron files translated. I've implemented l10n lookup from XML property files using XSLT before, but implementing extracting messages to property files and generating translated Schematron files using translated property files seemed like too much effort for just the 'focheck' project.
If Schematron is being compiled to XSLT for runtime then it should be possible to use my Saxon extension http://xmlguru.cz/2006/10/saxon-gettext without need to provide multiple translated Schematron files.
I've looked at it in the past, though I can't always find it every time that I look for it. My understanding is that for use with the Saxon extension, the Schematron message: name="<value-of select="@name"/>" cannot be used when axf:document-info with name="xmp" is present. it would have to be marked up as: <t:_>name="</t:_><value-of select="@name"/><t:_>" cannot be used when axf:document-info with name="xmp" is present.</t:_> but I was thinking in terms of dumping a properties file where the key is more like: name="{@name}" cannot be used when axf:document-info with name="xmp" is present. so it can be translated as a sentence and so it's possible to rearrange multiple <value-of> if necessary for the translation. (I obviously haven't got as far as inventing shorthands for all of the elements allowed in Schematron messages, let alone supporting foreign elements and attributes.)
Drawback is that is used Gettext and not OmegaT and that I haven't upgraded extension to recent Saxon versions. But it would be nice to have some localization library kind of standardized at least for XSLT.
It's possible to get XLIFF and other formats out of OmegaT, so using OmegaT doesn't preclude using other tools as well. However, I'm not wedded to OmegaT: it's just that it's a good-enough free solution for a small-scale problem that I had. So having a good, standard, batch method for XSLT would still be a good idea. However, since we're talking about Schematron in general, not all Schematron is run using XSLT. Regards, Tony Graham. -- Senior Architect XML Division Antenna House, Inc. ---- Skerries, Ireland tgraham@antenna.co.jp