[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Questions on XML syntax and conformance issues
Morus Walter <morus.walter@g...> wrote: > > The test suite says test 'valid-sa-094' (from James Clarks test cases) to be > not wellformed. > <!DOCTYPE doc [ > <!ENTITY % e "foo"> > <!ELEMENT doc (#PCDATA)> > <!ATTLIST doc a1 CDATA "%e;"> > ]> > <doc></doc> > The problem they see, seems to be the "%e;" in the attribute value. > If this is a PEreference, it would be forbidden in the internal subset. > However I don't think it is one. Attribute values are defined as > [10] > AttValue > ::= > '"' ([^<&"] | Reference)* > '"' > | "'" ([^<&'] > | Reference)* "'" > so '%' does not have a special meaning here. Hence I would not regard this > as an entity reference. Any comments on that? > I agree. As section 4.4 of XML 1.0 states clearly that parameter entities which occurs as attribute value are not recognized. In other words, they are to be handled as a normal literal. Test case "valid-sa-094" is one of those we found to be erraneous when we conducted conformance tests. > Attribute normalization: > The standard says, that WS should be mapped to blanks and character references > to the referenced character. > For non-CDATA attributes sequences of *blanks* should then be mapped to > single spaces. > So if I have e.g. a NMTOKENS attribute 'a b' step one creates a\nb' > (where \n denotes a linefeed). > Now what is step two supposed to do? According to the spec nothing. > However the testcase sa02 (from the sun test cases) says, that the result > value for the attribute should be 'a b'. > Actually this makes much more sense, than the result of literally following > the spec. But what it says must be accepted as what it means when we are dealing with conformance tests; I mean the tests are not to be conformant otherwise. The XML 1.0 Specification Errata made it unambiguous how character references get normalized in contrast to how whitespace characters (not a space) do. See http://www.w3.org/XML/xml-19980210-errata#E61 Therefore I believe that now test case sa02 needs to be corrected. > WS in empty elements: > If an element is declared empty and denoted by a start and an end tag, > should it be allowed to have whitespace between the tags? > I don't think so. The spec says, that that the end tag must follow the > start tag immediately. > However I find samples where this happens. Which test cases are you talking about here? I think the spec is clear about this point as well. An element declared as EMPTY must take either the form of <foo></foo> or <foo/> if it is being validated. = Takuki Kamiya Phone: (045)476-4586 Fax: (045)476-4749 = = FUJITSU LIMITED (COINS:7128-4217 NIFTY:HHA01731) = *************************************************************************** This is xml-dev, the mailing list for XML developers. To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|