[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: XLIFF 1.2 Errata: Schema glitch in <xliff> element definition
Hi all, First of all: Doug, Bryan, thank you for your comments. I will be joining to TC soon, I'm simply waiting for some practical/"political" issues relating to the Oasis membership to be resolved. Until then there might be some further comments on this list... Now on to an inconsistency between the schema and the specification: The <xliff> element contents description is defined as: One or more <file> elements, followed by Zero, one or more non-XLIFF elements. This is represented in the schema as: <xsd:element name="xliff"> <xsd:complexType> <xsd:sequence maxOccurs="unbounded"> <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="skip"/> <xsd:element ref="xlf:file"/> </xsd:sequence> ... attributes ... </xsd:complexType> </xsd:element> Notice two things: 1) The sequence is switched around, so you have to end with a <file> element, hence invalidating the 'followed by zero, one or more non-XLIFF elements" statement. 2) This definition allows for mixing any number of <file> and other-ns elements, as long as you end with a <file> element... This representation allows much more than the specification, for example the following instance: <xliff> <my:bogus ... /> <file ...> ... </file> <my:bogus ... /> <my:bogus ... /> <my:bogus ... /> <my:bogus ... /> <file ...> ... </file> <my:bogus ... /> <my:bogus ... /> <file ...> ... </file> <!--- a file element must be the last element --> </xliff> To represent the intent of the specification, the <xliff> element definition can be rewritten as: <xsd:element name="xliff"> <xsd:complexType> <xsd:sequence> <xsd:element ref="xlf:file" maxOccurs="unbounded" minOccurs="1" /> <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="skip"/> </xsd:sequence> ... attributes ... </xsd:complexType> </xsd:element> cheers, asgeir -- Asgeir Frimannsson PhD Candidate School of Software Engineering and Data Communications Queensland University of Technology 126 Margaret Street, Level 3 Brisbane QLD 4001, Australia Phone: (+61) 7 3138 9332 Mob: (+61) 405 412 696 Email: asgeirf@gmail.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]