|
Re: [rng-users] Attribute value restrictions
>
>
>
> You can just describe the differences on a restriction and on an extension
> you just add whatever else you would like to be included in the type.
I was a member of the W3C XML Schema WG. As far as derivation by
restriction is concerned, I strongly believe that you have to write
everything rather than differences. I checked some tutorials again,
but I still believe I am not mistaken. (Derivation by extension is
certainly different.) If you can just describe differences for
derivation by restriction, please give a real example. Your schema
fragment shown in your earlier mail does not work.
> Thanks for the multiple include advice, I had tried something similar but we
> are unfortunately in need of producing xsd files as well and have been using
> trang as the transformation engine between rng and xsd. Trang does not
> currently support nested grammars so that will not work for me either,plus
Some software expands nested grammars. You might then want to use trang.
> I'm not really sure that gets at the sort of inheritance I was looking for.
Certainly it does not. RELAX NG does not provide inheritance.
> Seams that you have to completely redefine the entry
No. You can override what you have to override withour redefining
everything.
>
> What I think would be really nice is if the ref tag had some similar sort of
> restriction/extension mechanism as xsd. I personally find that approach a
> bit more readable/understandable then using nested grammers/overriding
> definitions, but that's just me.
I am not a fan of derivation by restriction. But it might be possible
to improve RELAX NG so that schema customization becomes even easier.
Cheers,
Makoto
|