MHonArc v2.5.0b2 -->
xliff message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: namespace versioning
All,
As it turns out, the policy of changing the namespace every version is
complicating the XSLTs to process XLIFF documents. I realize that the TC is
following OASIS recommendation, but I feel that the recommendation, while
having some merit, may be causing more problems than it is fixing.
I use an XSLT to merge an XLIFF document with its skeleton. I need to have
separate XSLTs for each version. Since XLIFF 1.0 uses a DTD rather than an
XML namespace, the XSLT for 1.0 and 1.x differ in that the 1.x namespaces
require a prefix. The only difference between 1.1 and 1.2 is the namespace.
Examples,
Merge XLIFF 1.0
<xsl:template match="/">
<xsl:for-each select="xliff/file">
<xsl:variable name="skeleton"
select="concat($path,header/skl/external-file/@href)"/>
<xsl:apply-templates select="document($skeleton, /)/*">
<xsl:with-param name="xliff-context" select="body"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
Merge XLIFF 1.1
... xmlns:xlf="urn:oasis:names:tc:xliff:document:1.1" ...
<xsl:template match="/">
<xsl:for-each select="xlf:xliff/xlf:file">
<xsl:variable name="skeleton"
select="concat($path,xlf:header/xlf:skl/xlf:external-file/@href)"/>
<xsl:apply-templates select="document($skeleton, /)/*">
<xsl:with-param name="xliff-context"
select="xlf:body"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
Merge XLIFF 1.2
... xmlns:xlf="urn:oasis:names:tc:xliff:document:1.2" ...
<xsl:template match="/">
<xsl:for-each select="xlf:xliff/xlf:file">
<xsl:variable name="skeleton"
select="concat($path,xlf:header/xlf:skl/xlf:external-file/@href)"/>
<xsl:apply-templates select="document($skeleton, /)/*">
<xsl:with-param name="xliff-context"
select="xlf:body"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
Note that XLIFF 1.0 does not use the xlf: prefix because it uses DOCTYPE.
Note that XLIFF 1.1 and 1.2 are identical, just the xmlns:xlf is different.
I'm not sure what we can do, if anything, but I would be interested in other
people's comments/suggestions and whether they have also had this problem.
BTW, I use XLIFF 1.1 for the skeleton format.
Regards,
Doug Domeny
Software Analyst
Ektron, Inc.
+1 603 594-0249 x212
http://www.ektron.com