Hi Dave,
See comments below.
Dave Pawson wrote:
> Some initial thoughts.
>
> On 20/10/05, George Cristian Bina <[EMAIL PROTECTED]> wrote:
>
>
> OK, major grouping helps. +1
>
>> Elements
>
>> Element: choice (name-class)
>> Specifies a union of name-classes
>> [name-class]+
>
> An element - true
> and a name-class.
> Confusing? I don't know.
That should be read defines a name-class. Maybe the Element: mark in
front of each element is redundant as they are already in the Elements
section.
> It's not a union though George - it's a choice,
> one from n?
A name-class is a set, if you say set A or set B that means A union B.
For instance
<name>a</name>
defines a name-class set containing {a}
<name>b</name>
defines a name-class set containing {b}
and
<choice>
<name>a</name>
<name>b</name>
<choice>
defines a name-class set containing both a and b: {a, b}
>> Element: choice (pattern)
>> List of valid pattern choices
>> [pattern]+
>
> 'Stealing with glee' from Eric, how about
> Element: choice (as a pattern)
I do not have a problem what syntax is used exactly to mark an element
that defines a pattern or a name-class. I used simply (pattern) or
(name-class) after each element name but there can be any symbols or you
can use other wording for that. All I would like to see is that the
elements are marked somehow.
>> Element: define
>> A named pattern, may specify combine as choice or interleave
>> @name, @combine?, [pattern]+
>
> I like the attribute notation... I wonder
> if the XSLT notation is acceptable?
> Especially when mixed with DTD notation! @combine? :-)
> I guess that's just presentation though.
Here I think define should be also marked as pattern.
Yes, it is supposed to be a quick reference so a short notation is
needed and everyone I think understands that.
>> Element: element (pattern)
>> Matches elements
>> (@name|[name-class]), [pattern]
>
> That's messy.
> Is that true?
> Either @name OR name-class content model?
> Mmm. Yep! Looks like it.
> (I don't understand that one)
Yes, using the name attribute is a short for having a name-class with a
single name:
<element name="name">
is equivalent with
<element>
<name>name</name>
In Relax NG the element and attribute patterns are used to define not
only the content of one element or attribute but they can be used to
define the content of a set of elements or attributes - this set is
specified by the name-class.
>> Element: empty (pattern)
>> Matches an empty node
>> {empty}
>>
>> Element: except (name-class)
>> Specifies a difference of name-classes
>> [name-class]
> Difference? I'd like to clarify that.. .or
> perhaps simplify would be a better word.
Again, the name-class is a set, if you exclude something from a set then
that is a difference.
<nsName ns="ns1">
<except><name>test</name></except>
</nsName>
represents: {x | x belongs to namespace ns1} \ {test | test from
namespace ns1}
So except as a name-class specifies a set difference.
>> Element: except (pattern)
>> Removes values(s) from a data pattern
>> [pattern]
> I like that description
That is your description :). I started with your document and changed
what I thought needs to be changed.
>> Element: grammar (pattern)
>> Defines named patterns and the start pattern.
>> (start | define | div | include)*
> Much clearer definition.
>
>
>
>> Element: include (pattern)
>> Includes an external grammar and merges its definitions
>> @href, (start | define | div)*
> Syntax change?
There is no syntax change here! Note that there are simple brackets
above, not square brackets.
> I thought [ ] was the content model?
Exactly, there are no square brackets above. In text I was not able to
format that as a blue link :).
> No... what semantics are you using [ ] for?
> Mmm.
[] is used as a link to a content model defined below, as a macro, as an
entity (I see that you made this last analogy).
> ()
group
> []
link to a content model
> {}
special symbols like empty content marked as {empty}. All these special
symbols I think need to be defined at the end of the document.
> Need to resolve these, but that's a secondary.
>
>
>> Element: name (name-class)
>> Defines a name-class with a single name
>> {QName}
> This is an odd one. The only one with a QName content.
I got the QName from your description and that is correct, I think, as
if you specify a prefix that will be solved in the current context to
the namespace bound to that prefix.
>> Element: notAllowed (pattern)
>> Always fails, provides abstract definitions that must be overwritten
>> before use.
>> {empty}
> I don't like this description, but neither did I
> like my own!
>
>
>> Element: nsName (name-class)
>> Any name in a namespace.
>> except?
>
> Syntax again? Should it be
> {except?} or (except?)
I do not see any syntax problem here, it specifies an optional except
element. There is not special symbol so no need for curly braces {} and
there is no grouping needed so no need for parentheses. Also if you look
above at the define element the same notation was used for the @combine
attribute to mark it as optional: @combine?
>
>> Element: optional (pattern)
>> Contains optional patterns
>> [pattern]+
>>
>> Element: param
>> Specifies parameters constraining datatypes
>> @name, #text
> #text syntax?
Here I think it should be needed a special symbol instead to specify
that the content is text.
>> Content model definitions
>> --------------------------------
>> [[pattern]]
>> (element | attribute | group | interleave | choice(as pattern) |
>> optional | zeroOrMore | oneOrMore | list | mixed |
>> ref | parentRef | empty | text | value | data |
>> notAllowed | externalRef | grammar)
> Yes, the 'choice(as pattern)' seems clear here.
>
>
>
>
>> Global attributes - apply to all elements
>> -------------------------------------------------
>> Attribute: ns
>> Defines the default namespace to be used for unqualified names.
>>
>> Attribute: datatypeLibrary
>> A URI identifying the library of datatypes being used.
> I like that.
>
>
>> Hope that helps,
>
>
> Getting there George. Getting there.
> Thanks for that.
>
> I'll do one along these lines
> and post it to the list for comment
Great, thanks!
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rng-users/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/