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

From
James Clark <>
Date
2002-04-14T05:50:31+00:00
ID
165043600.1018788794@[192.168.0.26]
Thread
Re: [relax-ng] Re: Compact syntax div/a:documentation
OK, so nobody seems to like the "#*" idea.

If we put ## in the grammar, then we don't need the empty [], so my example 
would become:

## Inline elements
{

  ## Emphasis
  {
    em = ...
    strong = ...

  }

  ## Technical
  {
    code =...
    ...
  }

}

## Block elements
{

  p = ...

}

This looks much better, but nonetheless I think it's surprising that 
removal of a ## line would make it not parse, so I think an explicit div 
keyword would be better:

## Inline elements
div {

  ## Emphasis
  div {
    em = ...
    strong = ...

  }

  ## Technical
  div {
    code =...
    ...
  }

}

## Block elements
div {

  p = ...

}

I experimented with the div1/div2/... idea, but it didn't seem to me to 
work very well: the div markers were too visually inconspicuous.

So at the moment I think the best solution is to use

  div { ... }

to represent a div.  This will be unsurprising to users, works OK with ##, 
and doesn't require any strange hacks.

James