James Clark scripsit:

>  element %foo  { }
>  %foo = x | y | z
>  %foo |= x
>  element parent %foo { }

All good.

> I think the clean solution is to add an attribute to define.  For
> example, you might have an "as" attribute, with possible values of
> "pattern" and "nameClass", defaulting to "pattern", so you would say:
> 
> <define name="foo" as="nameClass">
>    <choice>
>      <ref name="bar"/>
>      <ref name="baz"/>
>    </choice>
> </define>
> 
> to define a name class.

Sounds right.  This could also be extended to defining datatypes that
can be restricted with new parameters using as="datatype".

> Note that
> 
> <define name="foo" as="nameClass">
>    <name>x</name>
>    <name>y</name>
> </define>
> 
> would be equivalent to
> 
> <define name="foo" as="nameClass">
>   <choice>
>     <name>x</name>
>     <name>y</name>
>   </choice>
> </define>

I wonder if that would be too confusing.  (I never use the XML
syntax myself, so it wouldn't affect me.)

-- 
My corporate data's a mess!                     John Cowan
It's all semi-structured, no less.              http://www.ccil.org/~cowan
    But I'll be carefree                        [EMAIL PROTECTED]
    Using XSLT
On an XML DBMS.

Reply via email to