[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 -----Original Message----- From: Tony Jewtushenko [mailto:Tony.Jewtushenko@oracle.com] Sent: Friday, January 10, 2003 11:39 AM To: xliff@lists.oasis-open.org Subject: [xliff] Fw: XLIFF 1.1 Draft 2b Yves has been having some mail problems with the OASIS mailing lists, so he's asked me to forward these onto you. These documents will be the basis for Tuesday's teleconference. Regards, Tony ----- Original Message ----- [snip] > > 4- All: Need help in make the XSD schema work for validating a list of > pre-defined values and a pattern for 'x-*'. The current schema has a test > for this for the context-type values. The XSD schema validates in XMLSpy, > but the Test2.xlf file (also in the Zip file) does not. > > [snip]
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC