Re: Issue: shall we rename the name attribute?

From
Murata Makoto <>
Date
2001-06-11T12:47:19+00:00
ID
Thread
Re: Issue: shall we rename the name attribute?
> Personally I found the name/role/label distinction to be the single most
> confusing thing in RELAX Core.  I really don't want to introduce something
> similar in RELAX NG.

Your argument almost always makes sense.  This time, it does not.   TREX 
and RELX NG already have something similar.  Any schema language based on 
tree automata will have non-terminal symbols.

This issue is very simple.  Which is more natural?

<define pattern="foo">
  <element name="foo">
     ....
  </element>
</define>

or 

<define name="foo">
  <element name="foo">
     ....
  </element>
</define>

?

Furthermore, we might have to multiple named patterns for the same tag name.
Isn't the below pattern confusing?

<define name="titleInSection">  <!-- probably we have another for titles in chapters.-->
  <element name="title">
     ....
  </element>
</define>

I much prefer

<define pattern="titleInSection">
  <element name="title">
     ....
  </element>
</define>.

You think that use of "name" for both purposes is fine.  Since different 
people have different tastes, such taste is not unreasonable.  
But your taste does not have any theoretical reasons.

Cheers,

Makoto