Search the web
Sign In
New User? Sign Up
rng-users · RELAX NG users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Attribute value restrictions   Message List  
Reply | Forward Message #1068 of 1127 |
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



Wed Jul 8, 2009 4:30 pm

mktmurata
Offline Offline
Send Email Send Email

Forward
Message #1068 of 1127 |
Expand Messages Author Sort by Date

I have a definition that contains a set of attributes that I want to apply to a variety of other types. When applies to the other types I want to be able to...
rob.dingwell
Offline Send Email
Jul 1, 2009
12:07 am

One way to overcome the problem is to use <define> as children of <include>. <include href="common.atts.rng> <define name="foo">...</define> .... </include> ...
MURATA Makoto (FAMILY...
mktmurata
Offline Send Email
Jul 1, 2009
5:07 am

Unfortunately that does not help me too much as I have schemas that I import the common attributes into that make use of them more then once , with different...
Dingwell, Robert A.
rob.dingwell
Offline Send Email
Jul 1, 2009
1:49 pm

... I am not an expert of W3C XML Schema, but I have thought that you have to copy the content of the original and then modify it rather than describing...
MURATA Makoto (FAMILY...
mktmurata
Offline Send Email
Jul 8, 2009
3:21 pm

On 7/8/09 11:18 AM, "MURATA Makoto (FAMILY Given)" ... You can just describe the differences on a restriction and on an extension you just add whatever else...
Dingwell, Robert A.
rob.dingwell
Offline Send Email
Jul 8, 2009
3:41 pm

... 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...
MURATA Makoto (FAMILY...
mktmurata
Offline Send Email
Jul 8, 2009
4:32 pm

On 7/8/09 12:30 PM, "MURATA Makoto (FAMILY Given)" ... The example was completely off the top of my head not really trying to validate. While it is true that...
Dingwell, Robert A.
rob.dingwell
Offline Send Email
Jul 8, 2009
6:38 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help