[examplotron] Re: Advanced handling of attributes

From: Jonathan Lang <dataweaver42@yahoo.com>
Date: Thu Jul 10 2003 - 02:41:44 UTC

Eric van der Vlist wrote:
>
> <ebnf-proposal-skipped/>
>
> I am just briefly checking my mails before the conference and will have
> a closer look at your proposal next week when I'll be back from Porland!

That's fine; after reading the "Introduction to Relax NG" online, I'm
rather embarrassed about some of the assumptions that I was making when I
came up with that - in particular, I now feel that I was excluding far too
much of the Relax NG compact syntax for no good reason, and was needlessly
blurring the line between the occurrence model and the content model of an
attribute. In the interest of keeping this discussion from splattering
all over the place, I'm consolidating all of my thoughts into this
message; feel free to disregard the previous posts.

Syntax:

valueMarkup ::= example? '{' (define | pattern) required? '}' example?
example ::= string
required ::= '!'

'define' and 'pattern' are defined as per the Relax NG compact syntax,
with the following exceptions:

 [1] pattern does not include attribute or element.
 [2] keywords are prepended by 'eg:' (or, more generally, whatever the
     Examplotron namespace extension happens to be); so 'list'
     becomes 'eg:list', 'text' becomes 'eg:text', 'token' becomes
     'eg:token', and so on.

Semantics:

'example' syntax becomes <ega:example>string</ega:example>

The absence of 'required' syntax results in the 'attribute' pattern in
question being placed within an 'optional' pattern.

When 'pattern' syntax is used, it gets transformed into XML form and
inserted directly into the schema.

When 'define' syntax is used, it gets transformed in a manner similar to
@eg:define.

Thoughts:

The conceptual distinction between 'content' and 'required' is that the
former defines what exists within the 'attribute' pattern, while the
latter helps define what exists on the Relax NG path between the
attribute's element and itself. Under these conditions, the only pattern
that retains meaning is 'optional' - and since an Examplotron attribute is
optional by default, this needs to be replaced by markup representing
"_not_ optional". The exclamation point was selected to avoid conflicts
with names.

=====
Jonathan "Dataweaver" Lang

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
Received on Thu Jul 10 04:42:20 2003

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