OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff-inline message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xliff-inline] Sample for metadata inline representation


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:datatypehttp://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
-----Original Message-----
From: Yves Savourel [mailto:ysavourel@enlaso.com] 
Sent: Sonntag, 14. August 2011 06:42
To: xliff-inline@lists.oasis-open.org
Subject: [xliff-inline] Sample for metadata inline representation

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


---------------------------------------------------------------------
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 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]