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


Help: OASIS Mailing Lists Help | MarkMail Help

xliff-comment message

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

Subject: RE: [xliff-comment] Including XHTML with XLIFF

So far, I have not needed to use XHTML tags in inline XLIFF tags (e.g., PH),
but I need them in the <source> and <target> tags. I noticed the XLIFF
schema already has multiple locations for elements/attributes of other

For validation, I added the <xsd:any> element to the XLIFF TextContent type
as shown below.

	<xsd:group name="ElemGroup_TextContent">
		<xsd:choice minOccurs="0" maxOccurs="unbounded">
			<xsd:element name="g" type="xlf:ElemType_g"/>
			<xsd:element name="bpt" type="xlf:ElemType_bpt"/>
			<xsd:element name="ept" type="xlf:ElemType_ept"/>
			<xsd:element name="ph" type="xlf:ElemType_ph"/>
			<xsd:element name="it" type="xlf:ElemType_it"/>
			<xsd:element name="mrk" type="xlf:ElemType_mrk"/>
			<xsd:element name="x" type="xlf:ElemType_x"/>
			<xsd:element name="bx" type="xlf:ElemType_bx"/>
			<xsd:element name="ex" type="xlf:ElemType_ex"/>
			<xsd:any namespace="##other" processContents="strict" minOccurs="0"/>

The XLIFF XML Schema is from message "Formal Extensibility" posted 06 Sep
2002 by Yves Savourel.

In addition, I did finally find the way to suppress the namespace attributes
from the output. Use the exclude-result-prefixes attribute.

For example,

<xsl:stylesheet version="1.0"
xmlns:xlf="urn:oasis:names:tc:xliff:document:1.1" xmlns=""


Doug D

Ektron, Inc.
+1 603 594-0249

-----Original Message-----
From: Yves Savourel [mailto:ysavourel@translate.com]
Sent: Monday, September 16, 2002 9:41 AM
To: xliff-comment@lists.oasis-open.org
Subject: RE: [xliff-comment] Including XHTML with XLIFF

> From: Doug [mailto:doug@ektron.com]
> Sent: Mon, September 09, 2002 10:49 AM
> Subject: [xliff-comment] Including XHTML with XLIFF
> I would like to include XHTML tags in the XLIFF document and still
> be able to validate and transform the XLIFF document. I don't want
> to require the translator to include the xhtml: (or html:)
> namespace when entering XHTML tags. It seems more natural to have
> to specify XLIFF tags (like <ph>) with the xlf: namespace rather
> than the more familiar HTML tags.
> Therefore I believe I need to make XHTML the default namespace and
> explicitly set the XLIFF namespace.
> Example XLIFF document,
> <?xml version="1.0" encoding="UTF-8"?>
> <xlf:xliff version="1.1" xmlns:xlf="urn:oasis:names:tc:xliff:document:1.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1 xliff.xsd"
> xmlns="xhtml">
> 	<xlf:file original="" source-language="EN" target-language="ES"
> datatype="html">
> 		<xlf:body>
> 			<xlf:trans-unit id="hw" datatype="html">
> 				<xlf:source>
> 					<i class="greeting">Hello</i> <xlf:ph id="w">World</xlf:ph>
> 				</xlf:source>
> 				<xlf:target>
> 					<i class="greeting">Hola</i> <xlf:ph id="w">Mundo</xlf:ph>
> 				</xlf:target>
> 			</xlf:trans-unit>
> 		</xlf:body>
> 	</xlf:file>
> </xlf:xliff>
> This document validates without a problem.

I don't think it should validate. Trying with XMLSpy 4.4 and the latest
XLIFF XSD it doesn't. The reason is that there is no extension point in any
of the inline elements (<ph> in this case). In order to have non-XLIFF
elements in <ph> you would have to have an <xsd:any namespace="##other">
element in the definition of <ph> and there is none.

We had (and I guess still having) this discussion regarding non-XLIFF
namespaces in inline elements with Martin Dürst at the Unicode conference in
Dublin. Currently (1.0 and the latest draft of 1.1) they are not allowed. I
recall sending a list of reason and examples, but I can't find it anymore.
The reason is basically that XLIFF is meant to be generic, not specific to
XML content (many content of XLF file are coming from non-XML douments), and
treating XML content differently leads to make exception cases. I don't
think we have close the discussion on this though.

Comments anyone?


To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>

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

Powered by eList eXpress LLC