Re: Schema refactoring

Same here - of course, Jirka, feel free to take that action item to do the
refactoring :) ,  if that works for you.

Best,

Felix

2012/9/7 Yves Savourel <ysavourel@enlaso.com>

> Jirka and Felix are the schema experts.
> My 2 cents are: +1
>
> -ys
>
> -----Original Message-----
> From: Arle Lommel [mailto:arle.lommel@dfki.de]
> Sent: Friday, September 07, 2012 6:48 AM
> To: Jirka Kosek
> Cc: public-multilingualweb-lt@w3.org
> Subject: Re: Schema refactoring
>
> Jirka,
>
> What you suggest makes a lot of sense to me and I'm entirely in favor of
> this approach. But I suspect Yves and Felix are the ones who will need to
> approve.
>
> Best,
>
> -Arle
>
> On Sep 7, 2012, at 2:38 PM, Jirka Kosek <jirka@kosek.cz> wrote:
>
> > 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
> > ------------------------------------------------------------------
> >
>
>
>
>
>


-- 
Felix Sasaki
DFKI / W3C Fellow

Received on Sunday, 9 September 2012 12:04:53 UTC