diff options
author | albert-github <albert.tests@gmail.com> | 2020-06-03 12:55:52 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-06-03 12:55:52 (GMT) |
commit | 88e70b5242b2446f33ab700e6d10e7f25ae2c349 (patch) | |
tree | e4c1bc4d115db7e8fd8404c77e83a595fe9c19e2 /templates | |
parent | fd1111503cd3e403db3784d03530e6ec3ac37032 (diff) | |
download | Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.zip Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.tar.gz Doxygen-88e70b5242b2446f33ab700e6d10e7f25ae2c349.tar.bz2 |
Adding the xml:lang tag to XML and Docbook output
Adding the xml:lang attribute for XNL and Docbook output
Interesting links:
- language codes (different from country codes!): https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
- example for xml.xsd: http://www.java2s.com/Code/XML/XML-Schema/importanotherXMLschema.htm
Diffstat (limited to 'templates')
-rw-r--r-- | templates/xml/compound.xsd | 3 | ||||
-rw-r--r-- | templates/xml/index.xsd | 3 | ||||
-rw-r--r-- | templates/xml/xml.xsd | 23 |
3 files changed, 29 insertions, 0 deletions
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index e17d2fa..1b3c2c0 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -1,5 +1,7 @@ <?xml version='1.0' encoding='utf-8' ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> + <xsd:element name="doxygen" type="DoxygenType"/> <!-- Complex types --> @@ -9,6 +11,7 @@ <xsd:element name="compounddef" type="compounddefType" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="version" type="DoxVersionNumber" use="required" /> + <xsd:attribute ref="xml:lang" use="required"/> </xsd:complexType> <xsd:complexType name="compounddefType"> diff --git a/templates/xml/index.xsd b/templates/xml/index.xsd index 04cb2f1..edb1d34 100644 --- a/templates/xml/index.xsd +++ b/templates/xml/index.xsd @@ -1,5 +1,7 @@ <?xml version='1.0' encoding='utf-8' ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> + <xsd:element name="doxygenindex" type="DoxygenType"/> <xsd:complexType name="DoxygenType"> @@ -7,6 +9,7 @@ <xsd:element name="compound" type="CompoundType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="version" type="xsd:string" use="required"/> + <xsd:attribute ref="xml:lang" use="required"/> </xsd:complexType> <xsd:complexType name="CompoundType"> diff --git a/templates/xml/xml.xsd b/templates/xml/xml.xsd new file mode 100644 index 0000000..9f80fe1 --- /dev/null +++ b/templates/xml/xml.xsd @@ -0,0 +1,23 @@ +<?xml version='1.0'?> +<xsd:schema targetNamespace="http://www.w3.org/XML/1998/namespace" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xml:lang="en"> + + <xsd:attribute name="lang" type="xsd:language"> + </xsd:attribute> + + <xsd:attribute name="space" default="preserve"> + <xsd:simpleType> + <xsd:restriction base="xsd:NCName"> + <xsd:enumeration value="default"/> + <xsd:enumeration value="preserve"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + + <xsd:attributeGroup name="specialAttrs"> + <xsd:attribute ref="xml:lang"/> + <xsd:attribute ref="xml:space"/> + </xsd:attributeGroup> + +</xsd:schema> |