hello,
just some thoughts of a RelaxNG user...

> I have dedicated a chapter of my book to this type of issues
> (http://books.xmlschemata.org/relaxng/relax-CHP-12.html)...
> 
> With RNG as it stands right now, my advise to schema authors is to define
> each of their element content as a named pattern so that people can add
> their stuff by combination.
> 
> If you wanted to make it easy to add stuff to every element in a single
> oparation (without having to combine each of the element content one by
> one), you could add to each element definition a reference to a pattern
> that you could name "extension" and define this pattern as "empty".
> 
> By combining this pattern with additional stuff (like the xml:* attributes
> in your example), people could add their additions to every element in a
> single step.

this does work quite well but still is tedious, as one has to remember 
to put this into *each and every* element. We did quite a large set of 
schemata and used this approach for other common attributes used by the 
format we work with but it is quite easy to overlook something...

> 
> Now, your question is: does it deserve a new pragma?

xml:* are special for several reasons (reserved namespace [at least 
somewhat], some are inherited, etc) and so essentially are a basic part 
of XML. Therefore a special treatment seems not a bad idea and quite 
reasonable IMHO.


> Technically speaking, that would be easy to add to grammars a an new
> pattern (right now grammars have only a start and define patterns) that
> could be called "common" or whatever and which would hold patterns to
> interleave into each element.
> 
> This pattern would be added to each element content during the
> simplification process and that would not even change the core semantics
> of RNG.
> 
> And this pattern could be local to its grammar so that authors can
> restrict its scope.
> 
> The big questions are "is that worth adding a new complexity to the
> language?" and  if yes "does that justify a RNG 1.1?"...
 >
> My 0.02 €.
> 
> Eric

If the downsides are just "minor" (at least it seems, I cannot really 
say of the technical issues) - and at least I think they are -  the 
upsides would win, would they not? One could always ignore this new 
feature and RelaxNG is quite simple and logical so that adding a minor 
complexity would not really hurt. I guess using the approach you 
described in your book itself is quite complex and does not really help 
reading and understanding the schema as at least it makes it longer and 
also in parts repetitive and redundant.

chris


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rng-users/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to