W3C home > Mailing lists > Public > xml-dist-app@w3.org > February 2001

SOAP 1.1 Validator - predefined-entity counter questions

From: Daniel Barclay <Daniel.Barclay@digitalfocus.com>
Date: Fri, 09 Feb 2001 16:10:51 -0500
Message-ID: <3A845CDB.3E8044F4@digitalfocus.com>
To: xml-dist-app@w3.org
CC: dave@userland.com, SOAP@DISCUSS.DEVELOP.COM
Dave,

I'm a little confused about one of the tests performed by your
SOAP validator at http://soap.weblogs.com/validator1.

The description of the first test (countTheEntities) 
(at http://soap.weblogs.com/validator1#countTheEntities) says:

  validator1.countTheEntities (string) returns struct

             This handler takes a single parameter, a string, that contains any number of
             predefined entities, namely <, >, &, ' and ".

             Your handler must return a struct that contains five fields, all numbers:
             ctLeftAngleBrackets, ctRightAngleBrackets, ctAmpersands, ctApostrophes, 
             ctQuotes. 

             To validate, the numbers must be correct.


1.  When you say that the string contains some "predefined entities, namely <, >, &, 
    ... ", what exactly do you mean?  (The character "<" is not a predefined entity, 
    nor even a reference to a predefined entity.)

    Do you mean that the XML source string contains predefined entity _references_
    that specify those characters (e.g, "&lt;", "&gt;", etc.)?

    Or do you mean that the XML source string contains some representation of the
    characters "<", ">", etc. (the characters for which there are predefined 
    entities), regardless of which representation is used (predefined entity
    references, any other entity references, character references, or CDATA 
    sections)?


2.  If you do mean entity references to predefined entities, it that actually 
    information that a SOAP application can count on getting from XML processors?

    Entity references are not part of the XML Information Set, right?

    The XML Information Set draft (at http://www.w3.org/TR/xml-infoset/) says,
    in section 1 [emphasis mine]:

        "An information set describes its XML document *with entity references 
        already expanded*, that is, represented by the information items 
        corresponding to their replacement text."

    Additionally, Section 2.5 says that any validating parser will not report
    references to entities [emphasis mine]):

        2.5. Unexpanded Entity Reference Information Items

              XML Definition: Section 4.4.3, Included If Validating

            A unexpanded entity reference information item serves as a
            place-holder by which an XML processor can indicate that it has 
            not expanded an external parsed entity.  ...  *A validating XML 
            processor, or a non-validating processor that reads all external
            general entities, *will never generate* unexpanded entity reference 
            information items for a valid document.*

   So, if you did mean to count entity references, this all seems to indicate 
   that a SOAP processor using a validating XML parsers can *never* pass your 
   first test.

   Am I missing anything?

Daniel
-- 
Daniel Barclay
Digital Focus
Daniel.Barclay@digitalfocus.com
Received on Friday, 9 February 2001 16:11:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:58 GMT