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] Preserve XML attribute or metadata without extensibility


Ah yes, you should hear all the wild things the coder in me says. But that's another story for another time.

 

Recalling the XSLT friendly requirement is impressive - what I like to call "respecting the 'X' in 'XLIFF' "

 

So I guess the thing to do is to just leave the newly documented (proposed) requirement in as is (http://wiki.oasis-open.org/xliff/XLIFF2.0/FeatureTracking#XLIFF2.0.2BAC8-Feature.2BAC8-PreserveXMLattributeormetadatawithoutextensibility.PreserveXMLattributeormetadatawithoutextensibility), and leave the technical solution for the future.

 

From: Rodolfo M. Raya [mailto:rmraya@maxprograms.com]
Sent: Tuesday, August 30, 2011 11:50 AM
To: xliff@lists.oasis-open.org
Subject: RE: [xliff] Preserve XML attribute or metadata without extensibility

 

Hi,

 

The coder in me says that the limitation is in XSLT, not in XLIFF, and we should not change the standard because of a third party problem.

 

Nevertheless, one of the approved requirements for XLIFF 2.0 is to make it XSLT friendly, so we will have to deal with your problem and find a solution.

 

I think that the right set of attributes in <ignorable> and <segment> could help with the limitations of XSLT.

 

Regards,

Rodolfo

--

Rodolfo M. Raya   <rmraya@maxprograms.com>

Maxprograms      http://www.maxprograms.com

 

From: Schnabel, Bryan S [mailto:bryan.s.schnabel@tektronix.com]
Sent: Tuesday, August 30, 2011 3:41 PM
To: Rodolfo M. Raya; xliff@lists.oasis-open.org
Subject: RE: [xliff] Preserve XML attribute or metadata without extensibility

 

You are correct Rodolfo.

 

> You may have problems dealing with attributes if you prefer XSLT

 

I would paraphrase your very correct statement to say "You cannot deal with all attribute use cases without using extensibility, if you prefer XSLT."

 

Hence my proposal.

 

- Bryan

 

From: Rodolfo M. Raya [mailto:rmraya@maxprograms.com]
Sent: Tuesday, August 30, 2011 11:31 AM
To: xliff@lists.oasis-open.org
Subject: RE: [xliff] Preserve XML attribute or metadata without extensibility

 

Hi Bryan,

 

Attributes for <ignorable> and <segment> still need to be defined. We could add something that lets the user differentiate the origin of the text.

 

The representation guide for HTML mentions 2 techniques for extracting text in section 2.3: using XSLT and using filters. You may have problems dealing with attributes if you prefer XSLT, but with filters there is no limitation.

 

Extracting text from XML is similar to extracting text from HTML. You also have two approaches and XSLT presents the same limitations. In my opinion, using configurable filters is better.

 

Regards,

Rodolfo

--

Rodolfo M. Raya   <rmraya@maxprograms.com>

Maxprograms      http://www.maxprograms.com

 

From: Schnabel, Bryan S [mailto:bryan.s.schnabel@tektronix.com]
Sent: Tuesday, August 30, 2011 3:12 PM
To: Rodolfo M. Raya; xliff@lists.oasis-open.org
Subject: RE: [xliff] Preserve XML attribute or metadata without extensibility

 

Hi Rodolfo,

 

Very nice. Your proposed solution using <ignorable> looks promising. If that is a preferred way, we should capture it in the wiki instead of my proposal. In your example I do not see how we would distinguish between element content vs. attribute content, nor do I see where the attribute names are stored. I assume that can all be established?

 

Just curious about how attributes are handled today with 1.2 without extensions. I know of support for handling *some* attributes without extensibility. But even our HTML representation guide recommends extensibility to preserve attributes not otherwise preserve-able  (http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2-cd02.html#PreservingAttributeValues). How would I preserve a silly case like an element that had 15 attributes (<myelement a="1" b="2" c="3" d="4" e="5" f="6" g=" . . . etc. )?

 

- Bryan

 

 

From: Rodolfo M. Raya [mailto:rmraya@maxprograms.com]
Sent: Tuesday, August 30, 2011 10:57 AM
To: xliff@lists.oasis-open.org
Subject: RE: [xliff] Preserve XML attribute or metadata without extensibility

 

Hi Bryan,

 

There is no need to use extensions for handling attributes when you convert XML files to XLIFF in XLIFF 1.2. Attributes are handled without using extensions in several tools today.

 

With the schema for XLIFF 2.0 that we have in SVN you don’t need to add another element to handle attributes. You can have something like:

 

        <unit id="1">

            <ignorable>

                <source>g_3423_spectrum</source>

            </ignorable>

            <segment>

                <source>It's orders of magnitude faster</source>

            </segment>           

            <segment>

                <source>This is orders of magnitude faster than swept analysis techniques.</source>

            </segment>

        </unit>

 

Regards,

Rodolfo

--

Rodolfo M. Raya   <rmraya@maxprograms.com>

Maxprograms      http://www.maxprograms.com

 

From: Schnabel, Bryan S [mailto:bryan.s.schnabel@tektronix.com]
Sent: Tuesday, August 30, 2011 2:41 PM
To: xliff@lists.oasis-open.org
Subject: [xliff] Preserve XML attribute or metadata without extensibility

 

I've been thinking about one of the major complaints about XLIFF 1.2; extensibility makes it difficult for toolmakers to process one another's XLIFF. Then I got to thinking about the primary reason I use extensibility. I use it a lot to preserve XML attributes in my source files. So I started thinking about ways to support the preservation of XML attributes that would remove the need for extensibility. I came up with a few ideas that I added to the wiki:

 

Today we sometimes need to use extensibility to preserve source XML attributes when converting an XML file to XLIFF. We should create a way to preserve the attributes using supported XLIFF markup - removing the need to extend.

 

Consider this XML element:

 

<para id="g_3423_spectrum" alt="It's orders of magnitude faster" rev="c">This is orders of magnitude faster than swept analysis techniques.</para>

 

If we were to allow an element like <meta-hold> to contain the name of the attribute, its value, and optionally its type and translate y/n, we would eliminate the need for extensibility for this use case.

 

Example:

<trans-unit id="para-73">

  <meta-hold name="id" translate="no">g_3423_spectrum</meta-hold>

  <meta-hold name="alt" translate="yes">It's orders of magnitude faster</meta-hold>

  <meta-hold name="rev">c</meta-hold>

  <source>This is orders of magnitude faster than swept analysis techniques.</source>

. . .

</trans-unit>

 

Modification to schema:

  <xsd:element name="meta-hold">

    <xsd:complexType mixed="true">

      <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/>

      <xsd:attribute name="name" type="xsd:string" use="required"/>

      <xsd:attribute name="type" use="optional"/>

      <xsd:attribute name="translate" use="optional"/>

    </xsd:complexType>

  </xsd:element>

 

 

Allow the usual inline elements, but do not allow nested <meta-hold> elements

  <xsd:group name="ElemGroup_TextContent">

    <xsd:choice>

      <xsd:element ref="xlf:g"/>

      <xsd:element ref="xlf:bpt"/>

      <xsd:element ref="xlf:ept"/>

      <xsd:element ref="xlf:ph"/>

      <xsd:element ref="xlf:it"/>

      <xsd:element ref="xlf:mrk"/>

      <xsd:element ref="xlf:x"/>

      <xsd:element ref="xlf:bx"/>

      <xsd:element ref="xlf:ex"/>

    </xsd:choice>

  </xsd:group>

 

I scanned the existing Feature Tracking page, and I don't think we already had something like this.

 

Thanks,

Bryan Schnabel
Content Management Architect
Phone: 503.627.5282
www.tektronix.com

TwitterRSS Facebook Tektronix Store

Tektronix Logo

 



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