[examplotron] Re: Advanced handling of attributes

From: Jonathan Lang <[email protected]>
Date: Wed Jul 09 2003 - 03:10:24 UTC

Eric van der Vlist wrote:
> Jonathan Lang said:
> > Eric van der Vlist wrote:
> > > Another option I have been playing with would be to allow a subset
> > > of Relax NG compact syntax in attributes and I'd like to be as close
> > > as possible to the compact syntax if we allow structured annotations
> > > in attributes.
> >
> > Note that the use of occurrence symbols that I outlined above
> > contradicts the Relax NG compact syntax. In Relax NG, "pattern '+'"
> > is equivelent to <oneOrMore>pattern</oneOrMore>; in the notation that
> > I proposed above, "pattern '+'" would equate to <list>pattern</list>.
> > Meanwhile, "pattern '*'" from Relax NG would be
> > <zeroOrMore>pattern</zeroOrMore>, and from my notation it would be
> > <optional><list>pattern</list></optional>.
>
> Ooops, yes I had missed this in your post.

I hope that it's not a problem.

> > Note also that Relax NG assumes that attributes are required, and uses
> > the "pattern '?'" notation to make them optional; Examplotron, OTOH,
> > assumes that attributes are required; therefore, a variation from the
> > Relax NG compact syntax is neccessary to provide some sort of notation
> > identifying required attributes.
>
> Right.
>
> The reason why attributes are optional by default in Examplotron is that
> we've though that this was the general case. Should we reconsider this?

Not in my opinion. You're right, in that required attributes seem to be
the exception rather than the rule in practice.

> > Furthermore, ref is explicitly excluded from being used within an
> > attribute, which puzzles me (especially since parentRef and
> > externalRef don't appear to be so restricted).
>
> I guess that you are refering to chapter 7 of the Relax NG spec:
>
> http://relaxng.org/spec-20011203.html#restriction
>
> If so, you must note that these restrictions apply to Relax NG schemas
> after simplification and that the simplification process makes sure that
> each element is defined in its own named pattern, that any element
> pattern is replaced by a ref and that there is no other refs than those
> refering to the definition of a single element. I have tried to explain
> all this in my RNG book:
> http://books.xmlschemata.org/relaxng/RngBookRestrictions.html

Thanks for the clarification. I'm definitely going to have to take the
time to read it.

=====
Jonathan "Dataweaver" Lang

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Wed Jul 9 05:10:57 2003

This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:29:47 UTC