- From: Jirka Kosek <jirka@kosek.cz>
- Date: Fri, 07 Sep 2012 14:38:29 +0200
- To: "public-multilingualweb-lt@w3.org" <public-multilingualweb-lt@w3.org>
- Message-ID: <5049EAC5.5090009@kosek.cz>
Hi, while I was inspecting datatypes used in schemas I have noticed that current approach for schema design taken from ITS 1.0 contains a lot of redundancy. For example for WithinText data category we have 5 very similar definitions of corresponding attribute: [19] att.local.no-ns.attribute.withinText ::= attribute withinText { "yes" | "no" | "nested" }? [29] att.local.with-ns.attribute.withinText ::= attribute its:withinText { "yes" | "no" | "nested" }? [99] withinTextRule.attributes ::= att.selector.attributes, attribute withinText { "yes" | "no" | "nested" } [101] att.withinText.attribute.withinText ::= attribute its:withinText { "yes" | "no" | "nested" }? [103] att.withinText.html5.attribute.its-within-text ::= attribute its-within-text { "yes" | "no" | "nested" }? This is hard to maintain and keep synchronized. I propose to redesign whole schema in the following way: 1. For each data category create pattern holding datatype which can be reused: withinText.type = "yes" | "no" | "nested" 2. Create pattern holding attribute definition in no namespace (for use on rules/span/ruby): attribute.withinText.nons = attribute withinText { withinText.type } 3. Create pattern holding attribute definition in ITS namespace (for use on elements in a host language): attribute.withinText = attribute its:withinText { withinText.type } 4. Create pattern hodling attribute for use in HTML5: attribute.withinText.html = attribute its-within-text { withinText.type } 5. Update all references to use new patterns above 6. Make sure that resulting generated schema uses its- prefix on all patterns in order to prevent clashes with other schemas. The main advantages of new approach are: - single definition of datatype -- this is important especially for newly introduced categories containing long lists of enumerated values - shorter schema and easier to maintain schema All comments welcomed. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------
Received on Friday, 7 September 2012 12:39:08 UTC