Localisation of Schematron QuickFixes

Hi all,

you may have heard of the Schematron QuickFixes specification
http://schematron-quickfix.github.io/sqf/publishing-snapshots/April2015Draft/spec/SQFSpec.html
this is an extension to Schematron to allow (automatic) fixes of errors detected by Schematron. You can find various examples at
http://www.schematron-quickfix.com/examples.html 

Recently I was contacted by Nico Kutscherauer, Co-Editor of the QuickFixes specification. The topic is localization of QuickFixes: QuickFixes can contain messages for the human reader, see the description element in the below example: 
  
<sqf:fix id="fixId">
    <sqf:description xml:lang="en">
        <sqf:title>Titel of the QuickFixes</sqf:title>
        <sqf:p>Additional documentation related paragraphs</sqf:p>
    </sqf:description>
    <!—Elements for the actual QuickFixes action, not important here-->
</sqf:fix>

at the moment it is possible to have such description elements in multiple languages:

1. a QuickFix (<sqf:fix>) may have several sqf:description elements, but these must have @xml:lang attributes with different values = express different languages.
2. such sqf:description elements can be inherited within a QuickFix document, via a reference mechanisms called "sqf:call-fix". I will leave out the details here - the main point is that language information is taken into account during this inheritance.

There is now discussion going on in the QuickFix community on how to make it possible to story the language specific descriptions externally to the actual QuickFix document, so that these descriptions can be handled differently.

The QuickFix community has provided some proposals which I am pasting below without further explanation. I am putting Nico in CC, he may add further information.


Variation#1: Use the Schemafron concept for localisation

Example code:
<sqf:fixes>
    <sqf:fix>
        <sqf:description>
            <sqf:title diagnostic="fix1_en_title fix1_de_title">The default message</sqf:title>
            <sqf:p diagnostic="fix1_en_descr fix2_de_descr">The default description</sqf:p>
            ...
        </sqf:description>
        <!-- ... -->
    </sqf:fix>
</sqf:fixes>
<sch:diagnostics>
    <sch:diagnostic id="fix1_en_title" xml:lang="en">...</sch:diagnostic>
    <sch:diagnostic id="fix1_en_descr" xml:lang="en">...</sch:diagnostic>
 
    <sch:diagnostic id="fix1_de_title" xml:lang="de">...</sch:diagnostic>
    <sch:diagnostic id="fix1_de_descr" xml:lang="de">...</sch:diagnostic>
</sch:diagnostics>

Variation#2: Develop a reference concept for descriptions in QuickFixes

Example code:
<sqf:fixes>
     <sqf:fix id="fix1">
         <sqf:description ref="desc_en_1"/>
         <sqf:description ref="desc_de_1"/>
         <!--...-->
     </sqf:fix>
</sqf:fixes>
<sqf:fixes>
     <sqf:description id="desc_en_1" xml:lang="en">
         <sqf:title>...</sqf:title>
         <sqf:p>...</sqf:p>
     </sqf:description>
     <sqf:description id="desc_de_1" xml:lang="de">
         <sqf:title>...</sqf:title>
         <sqf:p>...</sqf:p>
     </sqf:description>
 </sqf:fixes>


Variation#3: Compromise between the two variants

Example code:
<sqf:fixes>
    <sqf:fix>
        <sqf:description xml:lang="nl">
            <sqf:title>...</sqf:title>
            ...
        </sqf:description>
        <sqf:description diagnostic="diagn_en_title diagn_en_p1 diagn_en_p2"/>
        <sqf:description diagnostic="diagn_de_title diagn_de_p1 diagn_de_p2"/>
        <!-- ... -->
    </sqf:fix>
</sqf:fixes>
<sch:diagnostics>
    <sch:diagnostic id="diagn_en_title" xml:lang="en">...</sch:diagnostic>
    <sch:diagnostic id="diagn_en_p1" xml:lang="en">...</sch:diagnostic>
    <sch:diagnostic id="diagn_en_p2" xml:lang="en">...</sch:diagnostic>
 
    <sch:diagnostic id="diagn_de_title" xml:lang="de">...</sch:diagnostic>
    <sch:diagnostic id="diagn_de_p1" xml:lang="de">...</sch:diagnostic>
    <sch:diagnostic id="diagn_de_p2" xml:lang="de">...</sch:diagnostic>
</sch:diagnostics>
Variation#4: Drop the idea of externalizing the descriptions in several languages 

See also the discussion on GitHub:

https://github.com/schematron-quickfix/sqf/issues/1

From a localization point of view, another variant, currently not being discussed in the QuickFix community, would be to have externalization of languages via an XLIFF pipeline. That is, one could story the information in several languages in XLIFF, and a concrete QuickFix document would contain just information related to one language. The benefit is that this is a clean solution, not trying to make QuickFix into a format for storing bitext ( see a definition of bitext here: https://www.w3.org/International/its/wiki/Open_Data_Management_for_Public_Automated_Translation_Services#Terminology ). The drawback is that one needs an additional workflow: 1) QuickFix document 2) XLIFF extraction 3) creation of multilingual information in XLIFF 4) integration of information in one language into QuickFixes.

I am posting this here to gather some feedback. People may do this on this list or in the QuickFixes GitHub. Nico said that the topic will be discussed next week at XML Prague - I won’t be at the event, unfortunately, so this is for everybody who has the opportunity to go to Prague.

Best,

Felix

Received on Saturday, 4 February 2017 07:53:42 UTC