W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1629] New: [FS] technical: 4.7.1 Direct Element Constructors: character content

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Jul 2005 10:15:38 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DtNEI-0003sM-2R@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1629

           Summary: [FS] technical: 4.7.1 Direct Element Constructors:
                    character content
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: jmdyck@ibiblio.org
         QAContact: public-qt-comments@w3.org


4.7.1 Direct Element Constructors

Norm

"Literal XML character data (CDATA) is assumed to be processed directly at
parsing level so it does not require any formal treatment."
    I think it's a bad idea for the FS to assume that the parsing phase
    does anything but parse. Instead, I don't see any problem with the FS
    treating CDataSections the same way it treats CharRefs and
    PredefinedEntityRefs.

"The normalization rule for a contiguous sequence of characters assumes:"
    1. boundary whitespace handling
    2. non-literal character resolution
    Rather than just assuming that this processng has occurred (at some
    stage and in some way that's disconnected from the formal semantics),
    it would be better to explicitly hook it into the formal semantics.
    See below.

Norm / rule 5
fn:codepoints-to-string((Char | "{{" | "}}" | CharRef | PredefinedEntityRef)+)
    You can't just plop down a hunk of element content as the argument in
    a function call: it isn't well-formed syntax. E.g., you could get
    something like
        fn:codepoints-to-string(-0A )

    Instead, I suggest:

        [[ DirCharsUnit ]]_ElementContent
        ==
        text { [[ DirCharsUnit ]]_DirCharsUnit }

    where []_DirCharsUnit is defined (in prose) to:
        a. normalize line-ends?
        b. handle boundary whitespace
        c. resolve non-literal characters (CharRefs, PredefinedEntityRefs,
           CDataSections, and escaped-braces)
        [reference XQuery 3.7.1.3]
        and then express the result as a StringLiteral (or any other
        Core Expr that yields the same value, I guess).
Received on Friday, 15 July 2005 10:15:42 UTC

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