W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

[XQuery] A.1 EBNF: introduce DirectConstructor

From: Michael Dyck <jmdyck@ibiblio.org>
Date: Sun, 15 Feb 2004 13:24:28 -0800
To: public-qt-comments@w3.org
Message-id: <402FE38C.5168C1B5@ibiblio.org>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:17 UTC