XLIFF Inline Markup SC

  • 1.  Sample for metadata inline representation

    Posted 08-14-2011 04:42
    Here is a second possibility for representing metadata. This time the idea is to use a generic markup like this one described previously only for the custom metadata, while any information known in the XLIFF specification would be using a dedicated element. Why this? Because this would allow tools to support different "modules" of metadata. For example a tool A could then support only the do-not-translate metadata, but nothing else. Another advantage would be that since some metadata would have dedicated elements, those could have dedicated attributes, and we could have new inline extra information without having to rely on pointing to another element. - the custom metadata would be represented the same way as in http://lists.oasis-open.org/archives/xliff-inline/201108/msg00028.html: A <mrk> element with a mandatory 'type' attribute, and optional 'idRef' attribute and possibly an optional 'id' attribute. There would be no provided values for 'type' as each one would be using the namespace-prefixed model already described. - the do-not-translate information would be represented by two elements: <notrans> and <trans>. - the terms would be represented by a <term> element. It would have an optional 'idRef' attribute to point to extra information. - the comments would be represented by a <note> element. It would have either a 'idRef' attribute pointing to the data, or a 'text' attribute holding the comment. And an optional 'origin' attribute. So this would give us something like this: <unit id='1'> <segment> <source>It would certainly be quite a <notrans>faux pas</notrans> to start a dissertation on the origin of <term idRef='t1'>modern novel</term> without mentioning <note text='Comments about the two cited stories.' origin='author'>the <mrk type='xyz:book-title' idRef='cust1'>Epic of <mrk type='abc:proper-noun'>Gilgamesh</mrk></mrk>. </note></source> <target>Ce serait certainement un <notrans>faux pas</notrans> grave de commencer une thèse sur <note idRef='c2'>l'origine du <term idRef='t1'>roman moderne</term></note>, sans mentionner <note text='Comments about the two cited stories.' origin='author'>l'<mrk type='xyz:book-title' idRef='cust1'>Épopée de <mrk type='abc:proper-noun'>Gilgamesh</mrk></mrk>. </note></target> </segment> <segment> <source><note text='Comments about the two cited stories.' origin='author'>There is also the <mrk type='xyz:book-title' idRef='cust2'>Story of <mrk type='abc:proper-noun'>Sinuhe</mrk></mrk>.</note></source> <target><note text='Comments about the two cited stories.' origin='author'>Il y a aussi l'<mrk type='xyz:book-title' idRef='cust2'>Histoire de <mrk type='abc:proper-noun'>Sinouhé</mrk></mrk>.</note></target> </segment> <termDefs> <termDef id='t1'>Info about the term 'modern novel'</termDef> </termDefs> <comments> <comment id='c2' origin='translator'>Translator's comments.</comment> </comments> <xyz:annotation id='cust1' type='book-title'>Some info about the Epic of Gilgamesh</xyz:annotation> <xyz:annotation id='cust2' type='book-title'>Some info about the Story of Sinuhe</xyz:annotation> </unit> Cheers, -ys


  • 2.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 08-23-2011 08:46
    Hi Yves/all,

    The samples for the requirement http://wiki.oasis-open.org/xliff/OneContentModel/Requirements#Mustallowtoassociatespansofcontentwithmetadata are

    1. flag indicating the span must not be translated
    2. flag indicating the span is a term
    3. Reference ID used to point to external annotation
    4. Translator comment
    5. Tool-specific processing instructions

    To me, the most natural choice for 1., 2. (to a certain degree 3.) and 4. would be W3C ITS. This choice would fit with our mantra "Don't reinvent the wheel".

    1. flag indicating the span must not be translated

    <unit id='1' xmlns:its=" http://www.w3.org/2005/11/its" ;>
    <!-- Of course, the namespace declaration for ITS might be able to go elsewhere - no need to have it on each "unit" -->
    <segment>
    <source>It would certainly be quite a <youNameIt its:translate="no">faux pas</youNameIt> ... </note></source>
    ...
    </unit>

    2. flag indicating the span is a term

    <unit id='1' xmlns:its=" http://www.w3.org/2005/11/its" ;>
    <!-- Of course, the namespace declaration for ITS might be able to go elsewhere - no need to have it on each "unit" -->
    <segment>
    <source>... on the origin of <tb its:term its:termInfoRefPointer='t1'>modern novel</tb> ... </note></source>
    ...
    <termDefs>
    <termDef id='t1'>Info about the term 'modern novel'</termDef>
    </termDefs>
    </unit>

    3. Reference ID used to point to external annotation

    Not sure that ITS already has something like this. However, the Resource Description Format (RDF) has :-) Here's a fictional example that show how to use RDF (in connection with Dublin Core) to attach meta data on the XLIFF file level. The example does not point to an external annotation. However, that's of course possible with RDF as well.

    <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
    <file original="hello.txt" source-language="en" target-language="fr" datatype="plaintext">
    <header>
    <rdf:RDF xmlns:dc=" http://purl.org/dc/elements/1.1/" ; xmlns:rdf=" http://www.w3.org/1999/02/22-rdf-syntax-ns#" ; xmlns:xsd=" http://www.w3.org/2001/XMLSchema#" ; xmlns:sls-prod=" http://www.sap.com/sls/1.0#" ;>
    <rdf:Description rdf:about="&res;5a04a406b4a511dd80a80019bbd3174047ade3870fad11ddaa4d0019bbd31740">
    <dc:title xml:lang="en-US" rdf:datatype http://www.w3.org/2001/XMLSchema#string" ;>XSR Test Object 1</dc:title>
    </rdf:Description>
    </rdf:RDF>
    </header>
    <body>
    <trans-unit id="hi">
    <source>Hello world</source>
    </trans-unit>
    </body>
    </file>
    </xliff>

    4. Translator comment

    <unit id='1' xmlns:its=" http://www.w3.org/2005/11/its" ;>
    <!-- Of course, the namespace declaration for ITS might be able to go elsewhere - no need to have it on each "unit" -->
    <segment>
    <source>... without mentioning <note its:locNote='Comments about the two cited stories.' origin='author'>the ... </note></source>
    <!-- Unfortunately, I currently don't know what to do about the "origin". RDF here as well? -->
    ...
    </unit>

    5. Tool-specific processing instructions

    See 3. (use RDF).

    Cheers,
    Christian



  • 3.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 08-24-2011 03:59
    Hi Christian, Thanks for the examples. > 3. Reference ID used to point to external annotation > Not sure that ITS already has something like this. > However, the Resource Description Format (RDF) has :-) > Here's a fictional example that show how to use RDF > (in connection with Dublin Core) to attach meta data on > the XLIFF file level. The example does not point to > an external annotation. However, that's of course possible > with RDF as well. For the external (external to the inline content) case: As you say the example is for a <file> element. Would you have an example for inline content? Is it different from using a marker that points to a non-XLIFF element? Like below: <source>...without mentioning the <mrk type='xyz:book-title' idRef='cust1'>Epic of Gilgamesh</mrk></source> ... <xyz:annotation id='cust1' type='book-title'>Some info about the Epic of Gilgamesh</xyz:annotation> Cheers, -yves


  • 4.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 09-06-2011 12:28
    Hi Yves, all,

    Disclaimer: I'm really no expert on RDF ...

    The Resource Description Framework is versatile. You can for example follow the approach from RDFa, and work with attribute extensions. RDFa related example:

    <div xmlns:dc=" http://purl.org/dc/elements/1.1/" ;
    about=" http://www.example.com/books/wikinomics" ;>
    <span property="dc:title">Wikinomics</span>
    <span property="dc:creator">Don Tapscott</span>
    <span property="dc:date">2006-10-01</span>
    </div>

    The essence (see http://en.wikipedia.org/wiki/RDFa#Essence ) includes that you define attributes like "about" and "property".

    Thus, in the context of generic inline markup (and possibly XLIFF as one deployment scenario for the generic inline markup), you may go for something like:

    <source>...without mentioning the <mrk about="urn:ISBN:0091808189" property="dc:title">Epic of Gilgamesh</mrk></source>

    Cheers,
    Christian




  • 5.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 08-24-2011 06:08
    Hi all, One aspect of inline markup we have not discussed yet is bidirectional information. - It can come from the original source material - It could be added during the translation process - Unlike most inline codes (like bold, etc.) which can usually be generic, it may be important for applications using the XLIFF content to see the bidi markers as true bidi markers so they can render the content properly. So, for example, if we have this in HTML: <p>Text with <bdi>Txet thgir-ot-tfel</bdi></p> Should the <bdi> element be represented as an inline code: <source>Text with <pc id='1'>Txet thgir-ot-tfel</pc></source> Or as metadata: <source>Text with <mrk type='???'>Txet thgir-ot-tfel</mrk></source> Or both? Actually this is a general question: If an original code corresponds to a special metadata for which XLIFF has a specific representation how should we encode the original codes? For example if HTML5 gets a translate attribute, how should we code it? Same for term, etc. Or should we have provision in the inline codes for a few attributes that would allow us to specify such information in addition to the general inline code information. For example: <source>Text with <pc id='1' bidi='auto'>Txet thgir-ot-tfel</pc></source> <source>It would certainly be quite a <pc id='1' translate="no">faux pas</pc></source> Personally I think having the information along with the inline code for the original data could be better because it allows to keep the two together when moving the markers. Any thoughts? -ys


  • 6.  Re: [xliff-inline] Sample for metadata inline representation

    Posted 08-24-2011 08:02
    Yves, what about using the Unicode bidi control characters instead of markup? I don’t think it would be unreasonable to expect an editor to correctly interpret them. -Arle On Aug 23, 2011, at 22:07 , Yves Savourel wrote: > Hi all, > > One aspect of inline markup we have not discussed yet is bidirectional information. > > - It can come from the original source material > > - It could be added during the translation process > > - Unlike most inline codes (like bold, etc.) which can usually be generic, it may be important for applications using the XLIFF content to see the bidi markers as true bidi markers so they can render the content properly. > > So, for example, if we have this in HTML: > > <p>Text with <bdi>Txet thgir-ot-tfel</bdi></p> > > Should the <bdi> element be represented as an inline code: > > <source>Text with <pc id='1'>Txet thgir-ot-tfel</pc></source> > > Or as metadata: > > <source>Text with <mrk type='???'>Txet thgir-ot-tfel</mrk></source> > > Or both? > > Actually this is a general question: If an original code corresponds to a special metadata for which XLIFF has a specific representation how should we encode the original codes? > > For example if HTML5 gets a translate attribute, how should we code it? Same for term, etc. > > Or should we have provision in the inline codes for a few attributes that would allow us to specify such information in addition to the general inline code information. For example: > > <source>Text with <pc id='1' bidi='auto'>Txet thgir-ot-tfel</pc></source> > > <source>It would certainly be quite a <pc id='1' translate="no">faux pas</pc></source> > > Personally I think having the information along with the inline code for the original data could be better because it allows to keep the two together when moving the markers. > > Any thoughts? > -ys > > > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. Follow this link to all your TCs in OASIS at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php >


  • 7.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 08-24-2011 08:25
    Hi Arle, > In response to: > http://lists.oasis-open.org/archives/xliff-inline/201108/msg00041.html > > Yves, what about using the Unicode bidi control > characters instead of markup? I don €™t think it > would be unreasonable to expect an editor to > correctly interpret them. I'm not sure bidi control characters are the right answer for this. See http://www.w3.org/International/questions/qa-bidi-controls Maybe Richard will have more input on the question. (I'll rely his emails to the SC if he answers) Cheers, -ys


  • 8.  RE: [xliff-inline] Sample for metadata inline representation

    Posted 09-06-2011 12:57
    Hi Yves, all,

    Good points. Comments below.

    Cheers,
    Christian