OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Questions on XML syntax and conformance issues

[ Lists Home | Date Index | Thread Index ]
  • From: "Takuki Kamiya" <kamiya@rp.open.cs.fujitsu.co.jp>
  • To: <morus.walter@gmx.de>, <xml-dev@xml.org>
  • Date: Wed, 8 Mar 2000 10:45:25 +0900

Morus Walter <morus.walter@gmx.de> 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&#10;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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS