example of limitations

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

example of limitations

Bruce D'Arcus-3
Let me give an example:

RELAX NG has a feature unsupported in other schema languages called
interleave.  If I say this:

citation = first & subsequent

... I am saying that a citation must include both first and subsequent
patterns, but order is unimportant. This is a great feature for a lot
of reasons, not least it makes it easier on developers writing these
files.

OK, cool.  The thing is, I cannot use interleave if those patterns are
defined by attributes.

Practically speaking, what this means is that if I change the content
model as you are advocating, then I do one of two things:

1)  I do not enforce any constraints on how often these elements
appear.  So one could have five different cs:layout elements with the
same cs:position attribute, and it would still be valid.  So it would
be valid, but effectively wrong.

2)  Constrain the occurrence to either one "all" or both a "first" and
"subsequent" (as now), except that in the second case order would be
enforced (which it is probably not now).  A developer in that case MUST
have the correct order to be valid.

Thoughts?

Bruce



Reply | Threaded
Open this post in threaded view
|

Re: example of limitations

Johan Kool
Well... if there is any trade of, I think you better stick with what  
you had. I just noticed the difference for the level of <layout> and  
found it somewhat odd. But I leave it to you as to say what is best.  
I think that being able to convert it to XML schema might be very  
useful. More useful that having "symmetry".

Johan


Reply | Threaded
Open this post in threaded view
|

Re: example of limitations

Bruce D'Arcus-3
On Oct 10, 2005, at 3:51 PM, Johan Kool wrote:

> Well... if there is any trade of, I think you better stick with what
> you had. I just noticed the difference for the level of <layout> and
> found it somewhat odd. But I leave it to you as to say what is best. I
> think that being able to convert it to XML schema might be very
> useful. More useful that having "symmetry".

It's tricky.  You're right that it is "somewhat odd."  OTOH, it's also
worth noting that XML Schema has no support for interleave.  It's not
possible to have an XML Schema where order is unimportant, which is
among the reasons I haven't yet created one.

To me the most important thing is that the schema be as good as it can
be, with "good" measured by:

        - feature completeness
        - elegance of design (which includes consistency)
        - ease of implementation for GUI and tools developers

Not sure what the best balance is.

I personally dislike XML Schema intensely.  It's way too complex where
I really don't care, and way too simple where I do.

Bruce



Reply | Threaded
Open this post in threaded view
|

Re: example of limitations

James Howison
In reply to this post by Bruce D'Arcus-3
On Oct 10, 2005, at 3:20 PM, Bruce D'Arcus wrote:

> Let me give an example:
>
> RELAX NG has a feature unsupported in other schema languages called  
> interleave.  If I say this:
>
> citation = first & subsequent
>
> ... I am saying that a citation must include both first and  
> subsequent patterns, but order is unimportant. This is a great  
> feature for a lot of reasons, not least it makes it easier on  
> developers writing these files.
>
> OK, cool.  The thing is, I cannot use interleave if those patterns  
> are defined by attributes.
>
> Practically speaking, what this means is that if I change the  
> content model as you are advocating, then I do one of two things:
>
> 1)  I do not enforce any constraints on how often these elements  
> appear.  So one could have five different cs:layout elements with  
> the same cs:position attribute, and it would still be valid.  So it  
> would be valid, but effectively wrong.
>
> 2)  Constrain the occurrence to either one "all" or both a "first"  
> and "subsequent" (as now), except that in the second case order  
> would be enforced (which it is probably not now).  A developer in  
> that case MUST have the correct order to be valid.

The second seems better to me.  Won't almost all records be generated  
by code, rather than by hand?  In that case enforcing order should be  
a one-time code it right problem ... or do I misunderstand?

--J


Reply | Threaded
Open this post in threaded view
|

CSL Editor

Johan Kool
In reply to this post by Johan Kool
CSL Editor has made some nice progress. It's not yet done, and there  
are still a few bugs that I need to iron out. Anyway, before  
completing it, I of course need the final, or at least a very close  
to final schema. I'll finish the development and release CSL Editor  
once that schema is ready.

CSL Editor wil require 10.4. It is possible to write this app for  
10.3, but in the way it is currently written that would be a complete  
rewrite. I am going to stick with 10.4. :-)

Cheers,

Johan