Re: [xliff] Frag ID example

From
Dr. David Filip <>
Date
2014-01-16T15:50:28+00:00
ID
Thread
Re: [xliff] Frag ID example
Yves, I think these are good internal exmples, however, we should also have examples of absolute referencing from outside of xliff.
If we go for container modules/extensions, these would have to go with examples to make the intent clear

Cheers

dF

Dr. David Filip

=======================

LRC | CNGL | LT-Web | CSIS

University of Limerick, Ireland

telephone: +353-6120-2781

cellphone: +353-86-0222-158

facsimile: +353-6120-2734

http://www.cngl.ie/profile/?i=452

mailto: 

On Thu, Jan 16, 2014 at 2:08 PM, Schnabel, Bryan S <> wrote:

Thanks Yves,

I will try an XSLT implementation with the help of these samples and see if I run into trouble.

Stay tuned,

Bryan

________________________________________

From:  [] on behalf of Yves Savourel []

Sent: Thursday, January 16, 2014 5:29 AM

To: 

Subject: [xliff] Frag ID example

Hi Bryan, all,

To follow up on the topic of making the Fragment Identifier section better with examples, would those two and the accompanying text

be helpful?

[[

Example 1: Relative reference to a note.

In the following example, a comment annotation points to a <note> element in the same unit. The _expression_ "#n=n1" is relative to

its location so only the note selector is needed.

<?xml version="1.0"?>

<xliff xmlns='urn:oasis:names:tc:xliff:document:2.0' version='2.0'

 srcLang='en' trgLang='fr'>

 <file id='f1'>

  <unit id="1">

   <notes>

    <note id="n1">Maybe "vie" should be capitalized, not sure.</note>

   </notes>

   <segment state='translated'>

    <source>It's life!</source>

    <target>C'est la <mrk id='m1' type='comment' ref="#n=n1">vie</mrk> !</target>

   </segment>

  </unit>

 </file>

</xliff>

Example 2: Reference to a custom extension.

In the following example, a custom inline annotation refers to an element in the custom namespace identified by the IRI

"example.com/myNamespace" and located at the <file> level. The _expression_ "#f=f1/my=set1" means: the element in the namespace

associated with the prefix "my", with an id or xml:id attribute set to "set1", within the <file> with id="f1".

The prefix "my" must be registered. Note that while that it makes the code more clear to use the same string "my" for the namespace

prefix declared in the <my:issues> element, both strings do not have to be the same.

<?xml version="1.0"?>

<xliff xmlns='urn:oasis:names:tc:xliff:document:2.0' version='2.0'

 srcLang='en' trgLang='fr'>

 <file id='f1'>

  <my:issues xml:id="set1" xmlns:my="example.com/myNamespace">

   <my:issue type="misspelling" info="'c'es' is unknown. Could be 'c'est'"/>

   <my:issue type="typographical" info="Sentence without capitalization"/>

  </my:issues>

  <unit id="1">

   <segment state='translated'>

    <source>It's life!</source>

    <target><mrk id='m1' type='my:issues' ref="#f=f1/my=set1">c'es</mrk> la vie !</target>

   </segment>

  </unit>

 </file>

</xliff>

]]

---------------------------------------------------------------------

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

---------------------------------------------------------------------

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