[examplotron] Re: Advanced handling of attributes

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Sun Jul 06 2003 - 06:41:44 UTC

On Sun, 2003-07-06 at 08:35, Jonathan Lang wrote:
> Eric van der Vlist wrote:
> > Jonathan Lang wrote:
> > > When applying the attribute annotations to the eg:attribute element
> > > annotation, you need to restrict some of the capabilities. Assertions
> > > are fine as is; they give you a way of validating the attribute's value.
> >
> > Assertions would still be an issue since they are currently translated
> > as Schematron rules and Schematron rules can't be applied to
> > attributes...
> Ahh... Oops. I figured that since Schematron is based on XPath,
> and XPath has a way to refer to attributes, then Schematron ought
> to be able to be applied to attributes. Pardon me for speaking
> up in such a poorly informed manner <wry grin>.

Yes, that's what I thought too before I had a case where I needed this
feature and the opportunity to try it!

I can't say I agree with this restriction which seems unnecessary but
it's documented in the spec...

> > 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.
> >
> > OTOH, I'd also like to keep the possibility to implement
> > Examplotron as a XSLT transformation and there is a compromise
> > to find between the expressiveness of these annotations and the
> > ease to translate them (and understand them).
> Understood. The whole notion of appending an occurrence symbol to
> the attribute's datatype occurred to me after reading up on the
> XPath 2.0 specification, which does something similar. I'll read
> up on the Relax NG compact syntax a bit more to see if I can find
> a possible compromise.
> > Thanks for your message. I hope I'll be able to spend some more
> > time on Examplotron during the summer!
> As do I. Looking over the "To Do" list in the specification, I
> find that I can't quite identify what of the Iconic 80% hasn't been
> done yet (besides the Attribute eyesore). If you could identify what
> else of the 80% isn't complete, I'd be much obliged.
> Meanwhile, I'm going to see about tackling the "proof of concept" -
> for my own amusement, if nothing else. I'll let you know how it
> turns out. Note, BTW, that I'm very much an amateur; if _I_ can put
> together an Examplotron schema for XHTML, you're pretty much
> guaranteed that you're doing everything right.

XHTML is often used as a proof of concept for schema languages, it has
even become a kind of tradition so, yes, that would be a nice thing to



Tired to type XML tags?
Upcoming Schema languages tutorial (registration open):
 - July 7th   (Portland, OR)      http://makeashorterlink.com/?K27A527A4
 - August 4th (Montreal, Canada)  http://makeashorterlink.com/?U28A217A4
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
Received on Sun Jul 6 08:41:45 2003

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