[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Bug in 1.2 DTD's with xml:lang
There is a bug in the DITA 1.2 DTDs with respect to xml:lang (the XSD's are correct) that we should fix. I cannot see that there is any problem doing so, but to take the onus of making a unilateral decision off of Robert, I volunteered to write this message. Executive summary ----------------- The xml:lang attribute must be able to take the null value. The DITA 1.2 XSDs properly allow this, but the DTDs do not. The DITA 1.2 DTDs (specifically, commonElements.mod) should be fixed. Details ------- See http://www.w3.org/TR/REC-xml/#sec-lang-tag where it says: The values of the attribute are language identifiers as defined by [IETF BCP 47], Tags for the Identification of Languages; in addition, the empty string may be specified. . . . In particular, the empty value of xml:lang is used on an element B to override a specification of xml:lang on an enclosing element A, without specifying another language. Within B, it is considered that there is no language information available, just as if xml:lang had not been specified on B or any of its ancestors. At http://www.w3.org/XML/1998/namespace it says: The value of the xml:lang attribute must be as specified by BCP 47, or be empty. In June, I commented on the 1.2 draft as recorded at http://wiki.oasis-open.org/dita/metadataElements#MiscellaneousAttributes Under "Miscellaneous Attributes" it says xml:lang is described at http://www.w3.org/TR/REC-xml/#sec-lang-tag (which is true), but then goes on to say its values are "as described in RFC 4646". But the referenced part of the XML spec says: The values of the attribute are language identifiers as defined by [IETF BCP 47], Tags for the Identification of Languages; in addition, the empty string may be specified. I suggest we just delete the "as described in RFC 4646" phrase. And again as recorded at http://wiki.oasis-open.org/dita/ditaProcessing#Translation In "The xml:lang attribute" we say: This attribute must be set to a language identifier, as defined by IETF RFC 4646 (http://www.ietf.org/rfc/rfc4646.txt) or successor. That's not true--because it can also take the null value.... The DITA 1.2 XSDs give xml:lang the following type (taken from http://www.w3.org/2001/xml.xsd#att_lang where it discusses it in greater detail) specifically to allow it to have the null value: <xs:union memberTypes="xs:language"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value=""/> </xs:restriction> </xs:simpleType> </xs:union> However, the DITA 1.2 DTDs declare xml:lang as NMTOKEN which doesn't allow the null string. The DITA 1.2 DTD (specifically, commonElements.mod) needs to be corrected to allow xml:lang to take the null string value. Its declared type should be changed from NMTOKEN to CDATA (which is the only XML type that allows the null string as a value). paul
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]