OASIS XML Localisation Interchange File Format (XLIFF) TC

RE: [xliff] Fw: XLIFF 1.1 Draft 2b

  • 1.  RE: [xliff] Fw: XLIFF 1.1 Draft 2b

    Posted 01-14-2003 12:08
     MHonArc v2.5.2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    xliff message

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


    Subject: RE: [xliff] Fw: XLIFF 1.1 Draft 2b


    This is how to change the xliff-values-1-1.xsd schema to validate "x-*".
    
    I made a total 3 changes to validate Text2.xlf.
    
    (1) Change reg exp in <xsd:pattern>. Old: "x-[a-z]". New: "x-[a-z\-]+". The
    old expression was "x-" followed by one lower case roman letter. The new exp
    is "x-" followed by one or more lower case letter or dash (-). Upper case
    letters are not allowed, but the exp could be enhanced to allow them and
    digits too, eg, "x-[a-zA-Z0-9\-]+".
    
    (2) Changed <xsd:enumeration> to <xsd:pattern>. This is required otherwise
    the pattern only applies to the enumerated values.
    
    NOTE: Unfortunately, XML Spy 4 does not catch the error if a value doesn't
    match one of the patterns.
    NOTE: The other issue is that a tool using intellisense can't list the
    enumerations.
    
    	<xsd:simpleType name="context-typeValueList">
    		<xsd:annotation>
    			<xsd:documentation>Values for the attribute
    'context-type'.</xsd:documentation>
    		</xsd:annotation>
    		<xsd:restriction base="xsd:string">
    			<xsd:pattern value="x-[a-z\-]+"/>
    			<xsd:pattern value="Database">
    				<xsd:annotation>
    					<xsd:documentation>??? {To be defined (and all
    lowercased)}</xsd:documentation>
    				</xsd:annotation>
    			</xsd:pattern>
    			<xsd:pattern value="Element">
    			:
    
    (3) PRACTICAL ISSUE: I also changed the xliff-1-1.xsd to make the
    <group|trans-unit|bin-unit> elements optional. I added minOccurs="0" in
    <xsd:choice>. I suspect this change should NOT be permanent. It may be that
    the test file should have one of the elements.
    
    <xsd:complexType name="ElemType_group">
    	<xsd:sequence>
    		<xsd:sequence>
    			<xsd:element name="context-group" type="xlf:ElemType_context-group"
    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:any namespace="##other" processContents="strict" minOccurs="0"
    maxOccurs="unbounded"/>
    			<xsd:element name="note" type="xlf:ElemType_note" minOccurs="0"
    maxOccurs="unbounded"/>
    		</xsd:sequence>
    
    		<xsd:choice minOccurs="0" maxOccurs="unbounded">      <!-- ddomeny added
    minOccurs -->
    
    			<xsd:element name="group" type="xlf:ElemType_group"/>
    			<xsd:element name="trans-unit" type="xlf:ElemType_trans-unit"/>
    			<xsd:element name="bin-unit" type="xlf:ElemType_bin-unit"/>
    		</xsd:choice>
    	</xsd:sequence>
    
    Regards,
    
    Doug Domeny
    
    Ektron, Inc.
    +1 603 594-0249
    http://www.ektron.com