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: John's recommendation for "ElemType_header" complex type


Title: Message
My action item from the meeting today was to verify the validity of the proposed schema change that fixes the choice occurrence restriction for the "ElemType_header" complex type.  I think John's proposal is good.  but I'd also recommend removing the redundant occurrence restrictions from each of the child elements, like this:
 
  <xsd:complexType name="ElemType_header">
    <xsd:sequence>
      <xsd:element name="skl" type="xlf:ElemType_ExternalReference" minOccurs="0"/>
      <xsd:element name="phase-group" type="xlf:ElemType_phase-group" minOccurs="0"/>
 
<!-- Schnabel, propose we put the occurrence restrictions on choice, and take them off of
               the individual elements
 
      <xsd:choice>
        <xsd:element name="glossary" type="xlf:ElemType_ExternalReference" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="reference" type="xlf:ElemType_ExternalReference" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="count-group" type="xlf:ElemType_count-group" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="prop-group" type="xlf:ElemType_prop-group" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="note" type="xlf:ElemType_note" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="tool" type="xlf:ElemType_tool" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:choice>
 
. . . like this: -->

      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="glossary" type="xlf:ElemType_ExternalReference" />
        <xsd:element name="reference" type="xlf:ElemType_ExternalReference" />
        <xsd:element name="count-group" type="xlf:ElemType_count-group" />
        <xsd:element name="prop-group" type="xlf:ElemType_prop-group"  />
        <xsd:element name="note" type="xlf:ElemType_note" />
        <xsd:element name="tool" type="xlf:ElemType_tool" />
      </xsd:choice>
 
      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
 
I tested the change with a modified version of Yves' small sample (which I added a header element to, with various child elements):
 
<?xml version="1.0"?>
<xliff version="1.1"
xmlns="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-1.1.xsd">
  <file original="test.xyz" source-language="en" datatype="plaintext">
      <header>
         <note priority="1">LitNum=24W-07245-6a; id=a952</note>
         <glossary><internal-file /></glossary>
         <reference><external-file href="http://www.tektronix.com/
" /></reference>
         <glossary><internal-file /></glossary>
         <tool tool-name="x-hammer" tool-id="r1">ps</tool>
         <note from="manufacturer" priority="1">T</note>
         <note from="disclaim" priority="1">no</note>
      </header>
    <body>
      <group reformat="yes">
        <context-group name="EngineersData" purpose="location x-test x-aaa match">
          <context context-type="database">Data ...</context>
        </context-group>
        <trans-unit id="1">
          <source>Text <x id='1' xid='2'/>Text after.</source>
        </trans-unit>
        <trans-unit id="2">
          <source>Τεχτ ιν Γρεεκ.</source>
        </trans-unit>
      </group>
    </body>
  </file>
</xliff>
 
This instance was not valid with schema in its original state.  But the instance is valid against the schema with the proposed change.
 
I welcome others to test also.
 
Thanks,
 
Bryan
 


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