(B26) Add optional format attribute for quick at-a-glance review - DONE
Owner: Bryan
Importance: Uncategorized
Category: Data Model | XML Schema
State: Done Core/Module: module
David Spec sign-off: NO [Bryan needs to restructure the module to reference subfs]
Tom Schema sign-off: No
Spec Updated: Yes. Schema Updated: No
Put an optional attribute on XLIFF elements that match a subset of HTML formatting elements (for example, HTML elements names like <script> would not be included). It would enable a quick "at-a-glance" HTML page to be created for review cycle. It would be important to specify that the attribute is not meant for round-tripping back into the original format. A second, optional attribute could be added for formatting style information. This attribute would be only available in cases where the first optional attribute is used.
It will be important that robust details are included in the specification. It is also recommended that a representation guide is published, that includes an example XSL stylesheet.
Example are listed in the details page
Have an optional format-style attribute to put on block and inline XLIFF elements that map to HTML, like this:
<xliff fs="html">
<file fs="body">
<unit id="1" fs="div">
<segment>
<source fs="p">Mick Jones renewed his interest in the Vintage <pc id="1" fs="strong">'72 Telecaster Thinline </pc> guitar. <x fs="br" />He says <pc fs="q">I love 'em</pc></source>
</segment>
</unit>
</file>
</xliff>A simple XSL like this:
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*" priority="2">
<xsl:choose>
<xsl:when test="@fs">
<xsl:element name="{@fs}">
<xsl:apply-templates />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>Could make a nice at-a-glance review page like this:
<html>
<body>
<div>
<p>Mick Jones renewed his interest in the Vintage <strong>'72 Telecaster Thinline </strong> guitar. <br/>He says <q>I love 'em</q>
</p>
</div>
</body>
</html>Back to XLIFF2.0/FeatureTracking
 XLIFF Wiki