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

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff message

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


Subject: RE: [xliff] ID values in inline code and XLIFF in general


Hi Yves,

We should probably use the standard NMTOKEN (named token) type, which is defined at http://www.w3.org/TR/2000/WD-xml-2e-20000814#sec-common-syn 

NMTOKEN doesn't allow spaces, so the separator can be defined as any standard space character (\s).

Another option is to define our own value set, which coule be something like:

  <xs:simpleType name="alfa">
    <xs:restriction base="xs:NMTOKEN">
      <xs:pattern value="([a-z]|[A-Z]|[0-9]|[\-_:])+"/>
    </xs:restriction>
  </xs:simpleType>

That is, letters a to z in lower or upper case plus digits 0 to 9 plus hyphen plus underscore plus colon.

In this case, we can define the type for the "subFlows" attribute as:

<xs:simpleType name="subFlows">
    <xs:restriction base="xs:string">
      <xs:pattern value="xs:alfa([\s]xs:alfa)+"/>
    </xs:restriction>
  </xs:simpleType>
  
Hope this helps,
Rodolfo 
--
Rodolfo M. Raya   <rmraya@maxprograms.com>
Maxprograms      http://www.maxprograms.com

> -----Original Message-----
> From: xliff@lists.oasis-open.org [mailto:xliff@lists.oasis-open.org] On Behalf
> Of Yves Savourel
> Sent: Monday, September 19, 2011 5:09 PM
> To: xliff@lists.oasis-open.org
> Subject: [xliff] ID values in inline code and XLIFF in general
> 
> Hello one and all,
> 
> As we were making progress on sub-flows in the Inline Markup SC, we
> reached a point where we have an attribute (called 'subFlows' for now) that
> can store a list of IDs.
> 
> The idea is that that attribute points to the different units where each sub-
> flow is stored.
> 
> For example, if you have this original HTML:
> 
> "Some text with <img title='Title text' alt='Alt text' src='image.png' />"
> 
> We would have this type of XLIFF:
> 
> <unit id='100'>
>  <segment>
>   <source>Title text</source>
>  </segment>
> </unit>
> <unit id='200'>
>  <segment>
>   <source>Alt text</source>
>  </segment>
> </unit>
> <unit id='300'>
>  <segment>
>   <source>Some text with <ph id='1' subFlows='100 200'/></source>
>  </segment>
> </unit>
> 
> where the subFlows attribute lists the IDs of the two <unit> elements where
> the title and alt texts are.
> 
> The question we have is:
> 
> What characters should be allowed in an ID in XLIFF?
> We need to know because the syntax of the subFlows value may be
> different depending on that (namely: it may change the separator between
> IDs).
> 
> A few notes:
> 
> a) The xsd:Id type is probably out because it forces a unique value per
> document, and most our IDs can be multiple within the document (while
> some are being unique in their context).
> 
> b) While we cannot think of everything, it may be wise to think about
> common IDs and allowance in other systems (DBs, UUIDs, Resource files,
> XPath, etc.). So we don't block out much.
> 
> c) For information, an ID can include just about anything in 1.2 (including
> space).
> 
> Any thoughts?
> -yves
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xliff-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: xliff-help@lists.oasis-open.org




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