productions [NS 1, 10, 11, 17]

Four comments here ... mostly on [NS 1], a minor goof on [NS 10].

- Dave



1.  Production [NS 1] doesn't match the preceding definition:

    - Definition says the declaration is done with an ATTRIBUTE whose
      (name has a) prefix (that) is "xmlns".

    - Production 1 says the other side of the "Eq" is a SystemLiteral

    - But attributes have an "AttValue", allowing entity references

    Life would be simpler in several ways if production 1 were brought
    into line with the definition (use "AttValue" not "SystemLiteral"):

    * Implementations of parsers and other XML tools wouldn't need
      special cases to handle those attributes differently unless
      they were actually performing namespace-related processing.

    * "Layered" implementations of namespaces could be done, vs being
      precluded due to a need to modify attribute parsing everywhere
      to selectively prevent entity expansion.

    * Users of namespaces would regain flexibility, such as being
      able to put the namespace URIs into internal entities so that
      only one copy needs to be changed as systems evolve, and so
      that the semantically significant URIs are all in one place
      (vs. scattered all over a large document!) for organizations
      which prefer such information maintainence conventions.

    
    PROPOSED FIX:  Update the production to use "AttValue":

	[1] NSDef ::= PrefixDef Eq AttValue

    However, see the next issue.


2.  Careful reading of this text draws the conclusion, which I hope
    is a bug, that namespace declarations may not be placed in DTDs.
    

    PROPOSED FIX:  Eliminate production [NS 1] in the Namespace draft.
    Modify the two productions where attribute names are used:

	[11] Attribute ::= (QName | PrefixDef) Eq AttValue
	[17] AttDef ::= S (QName | PrefixDef) S AttType S DefaultDecl
    
    ALSO provide some examples of <!ATTLIST ...> declarations showing
    "correct" usage of "xmlns" and "xmlns:foo" namespace declarations.
    For example, corresponding to the existing example in section 2,

	<!--
	    all "x" elements, and their children, may use the
	    namespace prefix "edi".  Its meaning is fixed except
	    for children which explicitly redefine it.
	-->
	<!ATTLIST x
	    xmlns:edi CDATA #FIXED 'http://ecommerce.org/schema'
	    >
    

3.  There's no text discussing the URI strings which are the values
    associated with the various "xmlns" attributes.  A complete URI
    syntax is necessary since these names are compared (as strings)
    to determine namespace equality.
    
    Are fragment identifiers allowed, or disallowed as elsewhere
    in the XML specification?

    How about non-ASCII characters, leading spaces, etc?


    PROPOSED FIX:  State that the URIs must be US-ASCII strings, with
    no fragment identifier or characters disallowed by URI syntax.  It
    is a WF error to be anything else.

    ALSO provide a reference to the current URI spec, the latest one
    seems to be a somewhat elderly RFC 1630.


4.  [NS 10] is called EmptyElement, so it's got a different name than
    [XML 44] EmptyElementTag.  Seems likely to be an editing mistake.

    PROPOSED FIX:  Rename [NS 10] to be "EmptyElementTag".

	[10] EmptyElementTag ::= '<' QName (S Attribute)* S? '/>'

Received on Sunday, 16 August 1998 19:40:24 UTC