OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: [relax-ng] Compact syntax div/a:documentation


But what if someone did something like:

#****** some annotation
...
#* some annotation
...
#*********** some annotation

How do we govern this? Would it be a fatal error to do anything other than
#*, #**, #***, etc.?

Mike
-----Original Message-----
From: James Clark [mailto:jjc@jclark.com]
Sent: Monday, April 08, 2002 11:45 PM
To: RELAX NG Mailing List
Subject: [relax-ng] Compact syntax div/a:documentation


I like the ## syntax proposed by John Cowan for a:documentation, and the
bare braces for <div> is quite intuitive, but I don't think the play well
together.  Imagine something like this

<grammar>

<div>
<a:documentation>Inline elements</a:documentation>

<div>
<a:documentation>Emphasis</a:documentation>

<define name="em">...</define>
<define name="strong">...</define>

</div>

<div>
<a:documentation>Technical</a:documentation>
<define name="code">...</define>
...
</div

</div>

<div>
<a:documentation>Block elements</a:documentation>

<define name="p">...</define>
...
</div>
</grammar>


Using the current syntax this would become:

## Inline elements
[] {

## Emphasis
[] {
em = ...
strong = ...

}

## Technical
[] {
code =...
...
}

}

## Block elements
[] {

p = ...

}

This seems pretty ghastly to me.  I would prefer to write something

#* Inline elements

#** Emphasis

em = ..
strong = ...

#** Technical

code = ..

#* Block elements

p = ...


In other words, # followed by N or more "*" characters (N > 1) starts an
N-level heading.  An N-level heading is a <div> with an <a:documentation>
that extends up to the next heading of level <= N.  (This would also work
nicely with outline mode in Emacs.)

You would still use "##" for comments that attach to something other than
div, and you would still use {} for divs with annotations other than
a:documentation.

I think <a:documentation> on <div> is at least as important as other uses of
<a:documentation>.  In many DTDs there are more comments that conceptually
apply to a <div> than comments that conceptually apply to a single
declaration.

James








----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC