Dave Pawson wrote:
>From the list put up so far:
> 
> Relative simplicity.
> Co-occurences constraints
> Interleaving
> Better modularity (is that subjective Jirka?)

That's a fine list already, but I have found that lemmings respond 
better to concrete examples than to a check-list (which is normal since 
if you knew those features could be useful, you'd have already looked 
elsewhere I guess).

For instance, making the attributes part of the content model (which is 
often placed under co-occurence constraints, though I'm not convinced 
that's a useful way of seeing it) is a feature that often comes in handy 
in cases like the following (since we're talking XHTML):

   <element name='script'>
     <choice>
       <attribute name='src'/>
       <text/>
     </choice>
   </element>

This is simple and obvious a thing to want to do right? Well, you can't 
do it in WXS.

I'm sorry I don't have time to write or dig up further examples for your 
list above, but there are some out there. There's probably a long list 
of posts from Eric on a bunch of lists explaining variants of what RNG 
can do that WXS can't.

Regarding modularity, I do find that the ability to join <define>s using 
the combine attribute allows for if not better at least much simpler 
modularity than WXS does. You can probably reproduce most of its power 
in WXS, but at the cost of tighter coupling between your modules (which 
is what you're trying to avoid in the first place by being modular) and 
more work. For instance, in SVG most of the modules define their own 
properties, which in a nutshell are attributes available on almost all 
elements. All they need to do is each of them in their corner <define> 
their own Properties group of attributes, with combine set to 
interleave. You can then add or remove any module from the driver that 
includes them, and the corresponding properties will magically appear 
and disappear from all the elements that may receive them. There are 
quite a few features supporting modularity in WXS, but I've found none 
to be as simple and powerful.

And hey, if they really want to be lemmings it's time to join the 
bandwagon: at least XHTML 2.0 and SVG 1.2 are using RNG as their primary 
schema language (precisely because it has more of the constraints they 
need), not WXS. I'm sure that a few other WGs will be following those 
examples, if they aren't already.

> Is the datatype library extensibility a feature of XSD too?

No, that's definitely a plus of RNG. Again for SVG, it's very hard to 
validate path data with WXS (you can, but the regex you need to do that 
is about thirty thousand characters long...). An external datatype 
library is being considered for a future release of the schema.

> Schematron extensions are (IMHO) one of the most useful
> features, but I guess that's not a part of RNG.

Right, you can add them to WXS as well.

> Whilst I realise RNG is not for all projects,  I certainly find it easier than
> DTD's.

It's more expressive, and it supports namespaces and data types... Who 
needs DTDs? :)

-- 
Robin Berjon
   Senior Research Scientist
   Expway, http://expway.com/




------------------------ 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