Hi there,
I noticed that the existing XLIFF XSDs (both strict and transitional) only make limited use of global/named types. Most of the time, the XSDs declare things inline. Example:
<xsd:element name="trans-unit">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="xlf:source"/>
<xsd:element ref="xlf:seg-source"
minOccurs="0"/>
<xsd:element ref="xlf:target"
minOccurs="0"/>
<xsd:choice minOccurs="0"
maxOccurs="unbounded">
<xsd:element ref="xlf:context-group"/>
<xsd:element ref="xlf:count-group"/>
<xsd:element ref="xlf:note"/>
<xsd:element ref="xlf:alt-trans"/>
</xsd:choice>
<xsd:any namespace="##other"
processContents="strict"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id"
type="xsd:string"
use="required"/>
<!-- more attribute declarations
deleted -->
</xsd:complexType>
From what I know, global/named types are a good choice in many contexts (amongst others since they facilitate reuse).
Thus, I wonder if we would want to take the opportunity to enhance the XSDs by means of global/named types. Example (first we declare a type, then we use it):
<xsd:complexType name="ElemType_trans-unit">
<xsd:sequence>
<xsd:element ref="xlf:source"/>
<!-- more element declarations deleted -->
</xsd:sequence>
<!-- more attribute declarations deleted -->
<xsd:attribute name="merged-trans"
type="xlf:AttrType_YesNo"
use="optional"
default="yes"/>
<xsd:anyAttribute namespace="##other"
processContents="strict"/>
</xsd:complexType>
<xsd:element name="trans-unit"
type="xlf:ElemType_trans-unit">
One example reuse opportunity which can be realized after this change is the following: Variant XLIFF schemas can be defined by means of the “redefine” mechanism. A variant schema may for example come in handy for checking constraints in a processing chain
which is not yet completely XLIFF enabled. Example: “target” elements do not get inserted automatically, but rather have to be inserted in advance (see example below thus defines “target” to me mandatory).
<xsd:schema xmlns:xlf="urn:oasis:names:tc:xliff:document:1.2.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:oasis:names:tc:xliff:document:1.2.1" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:redefine schemaLocation="xliff-core-1.2.1-strict-typed.xsd">
<xsd:complexType name="ElemType_trans-unit">
<xsd:complexContent>
<xsd:restriction base="xlf:ElemType_trans-unit">
<xsd:sequence>
<xsd:element
ref="xlf:source"/>
<xsd:element
ref="xlf:target"/>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:redefine>
</xsd:schema>
From my understanding, the effort to implement the proposed changes is low – and a couple of supporters exist.
Since the proposed change does not impact “what” we define with the XSD, I would hope that we would be allowed to consider the change for the updated XSDs we intend to publish with the errata for 1.2
It would be great if we could discuss (or possibly even vote) related to this in the near future.
Cheers,
Christian
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des
Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform
us immediately and destroy the original transmittal. Thank you for your cooperation.