[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: XML Schemas discussion items for DITA 1.1
Hello, Two things up for discussion in this note: 1) Design pattern change for XML Schemas - class attribute 2) Documenting catalog entries for the DITA XML Schemas I know this is probably not the best of time to make changes to the schemas, but I think this is one that we should discuss. The schemas are starting to get more attention and usage. Unfortunately, this one slip under the radar, but if possible I would like to address for in DITA 1.1. 1) The DITA DTD Architecture binds the class attribute declaration via an ATTLIST declaration. The current DITA XML Schema does not bind the class attribute to the element. It binds the class attribute to the complexType. I think we should make the appropriate changes to the schemas in order to have the class attributes bound to the element declaration. It means a sweeping change to the schemas, one that would be hidden from the end user and it would affect existing specializations as long as they did not use extensions in the past. The new design pattern also make a bit easier for renaming elements as part of specialization. As user can now use XML schema extension mechanism to reuse a base specialization complexType and add the appropriate class attribute value for the new element. 2) We need to properly document values for the DITA XML Schemas that would be used in an XML Catalog, much like the PUBLIC ID values for the DTDs These should be documented so that DITA enabled XML Editors can use these values for the xsi:noNamespaceSchemaLocation attribute where an XML resolver can resolve the value to a local instance of the schemas. In most cases, the resolver would use the namespace of the schemas as a unique value as the key. Since the DITA schemas do not have XML Namepaces we need another unique identifier for the schemas. Kind regards, Eric We could use something like the URL location of the schemas at OASIS as the unique identifier. <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/topic.xsd" uri="schema/topic.xsd"/> <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/map.xsd" uri="schema/map.xsd"/> <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/reference.xsd" uri="schema/reference.xsd"/> <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/task.xsd" uri="schema/task.xsd"/> <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/ditabase.xsd" uri="schema/ditabase.xsd"/> <system systemId="http://docs.oasis-open.org/dita/v1.1/schema/concept.xsd" uri="schema/concept.xsd"/> What would have to change to the desing pattern for the XML Schemas. <xs:element name="p" type="p.class"> <xs:annotation> <xs:documentation>A paragraph element (<<keyword>p</keyword>>) is a block of text containing a single main idea. </xs:documentation> </xs:annotation> </xs:element> <xs:complexType name="p.class" mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="para.cnt"/> </xs:choice> <xs:attribute name="outputclass" type="xs:string"/> <xs:attributeGroup ref="univ-atts"/> <xs:attributeGroup ref="global-atts"/> <xs:attribute ref="class" default="- topic/p "/> </xs:complexType> would become <xs:element name="p"> <xs:annotation> <xs:documentation>A paragraph element (<<keyword>p</keyword> >) is a block of text containing a single main idea. </xs:documentation> </xs:annotation> <xs:complexType> <xs:complexContent> <xs:extension base="p.class"> <xs:attribute ref="class" default="- topic/p "/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> <xs:complexType name="p.class" mixed="true"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:group ref="para.cnt"/> </xs:choice> <xs:attribute name="outputclass" type="xs:string"/> <xs:attributeGroup ref="univ-atts"/> <xs:attributeGroup ref="global-atts"/> </xs:complexType> New specialization: <xs:element name="para"> <xs:complexContent> <xs:extension base="p.class"> <xs:attribute ref="class" default="- topic/p myspec/para " /> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> Eric A. Sirois Staff Software Developer DB2 Universal Database - Information Development DITA Migration and Tools Development IBM Canada Ltd. - Toronto Software Lab Email: esirois@ca.ibm.com Blue Pages (Internal) "Transparency and accessibility requirements dictate that public information and government transactions avoid depending on technologies that imply or impose a specific product or platform on businesses or citizens" - EU on XML-based office document formats.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]