[XQuery] A.1 EBNF: introduce DirectConstructor

XQuery 1.0: An XML Query Language
W3C Working Draft 12 November 2003

3.7 Constructors,
A.1 EBNF

I think it would be an improvement if you changed

    [80] Constructor        ::= DirElemConstructor
                                | ComputedConstructor
                                | XmlComment
                                | XmlPI
                                | CdataSection 

to

    [80] Constructor        ::= DirectConstructor | ComputedConstructor
    [new] DirectConstructor ::= DirElemConstructor
                                | XmlComment
                                | XmlPI
                                | CdataSection 

This would better reflect the division between computed and direct
constructors. Incidentally, it would also mean that you could change:

    [109]   ElementContent  ::= ElementContentChar
                                | "{{"
                                | "}}"
                                | DirElemConstructor
                                | EnclosedExpr
                                | CdataSection
                                | CharRef
                                | PredefinedEntityRef
                                | XmlComment
                                | XmlPI

to just:

    [109]   ElementContent  ::= DirectConstructor
                                | ElementContentChar
                                | "{{"
                                | "}}"
                                | CharRef
                                | PredefinedEntityRef
                                | EnclosedExpr

------------------------------------------------------------------------

Moreover, if you introduced

    [new]  CommonContent  ::= PredefinedEntityRef
                              | CharRef
                              | "{{"
                              | "}}"
                              | EnclosedExpr

then you could eliminate a bunch of repetition in [109,112,113]:

    [109]  ElementContent       ::= DirectConstructor
                                    | ElementContentChar
                                    | CommonContent

    [112]  QuotAttrValueContent ::= QuotAttContentChar | CommonContent


    [113]  AposAttrValueContent ::= AposAttContentChar | CommonContent

-Michael Dyck

Received on Sunday, 15 February 2004 16:25:26 UTC