W3C home > Mailing lists > Public > public-xml-testsuite@w3.org > August 2004

Re: bad tests?

From: Daniel Veillard <daniel@veillard.com>
Date: Thu, 12 Aug 2004 12:45:56 +0200
To: Musachy Barroso <musachy@gmail.com>
Cc: public-xml-testsuite@w3.org
Message-ID: <20040812104556.GD8789@daniel.veillard.com>

On Wed, Aug 11, 2004 at 11:39:21PM +0000, Musachy Barroso wrote:
> 
> 
> 
> 
> Hi
> 
> I'm having problem with some tests in ../invalid/sun (I don't have the
> exact list now but I will send it later), this is one of them
> (not-sa04.xml):
> 
> <?xml version='1.0' standalone='yes'?>
>   <!DOCTYPE attributes SYSTEM "../valid/sa.dtd" [
>       <!--
>           attribute needs defaulting
>        -->
>   ]>
> <attributes/>
> <?pi equals three?>
> 
> --------------------------------
> and with this dtd:
> --------------------------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
>   <!ELEMENT root (child|attributes)*>
>   <!ELEMENT child (#PCDATA)>
>   <!ELEMENT attributes EMPTY>
>   <!ATTLIST attributes
>       token           (a|b|c)         "a"
>       notation        (nonce|foo|bar) #IMPLIED
>       nmtoken         NMTOKEN         #IMPLIED
>       nmtokens        NMTOKENS        #IMPLIED
>       id              ID              #IMPLIED
>       idref           IDREF           #IMPLIED
>       idrefs          IDREFS          #IMPLIED
>       entity          ENTITY          #IMPLIED
>       entities        ENTITIES        #IMPLIED
>       cdata           CDATA           #IMPLIED
>       >
> 
>   <!ENTITY internal   " internal&number; ">
>   <!ENTITY number     "42">
> 
>   <!NOTATION nonce    SYSTEM "file:/dev/null">
>   <!NOTATION foo      PUBLIC "-//public id//foo" "file:/dev/null">
>   <!NOTATION bar      SYSTEM "file:/dev/tty">
> 
>   <!ENTITY unparsed-1 PUBLIC "-//some public//ID" "file:/dev/console"
>                       NDATA nonce>
>   <!ENTITY unparsed-2 SYSTEM "scheme://host/data"
>                       NDATA foo>
> 
> ---------------------------------------------------------------------------
> 
> Here the conformance test is expecting the parser to accept the input
> file as valid. Maybe I'm missing something but isn't that against the
> VC in Sec 4.9? Besides that the header text of the test says that the
> test must fail. (There are others related to this one)

  A parser which fetches the external subset should report a well-formedness
error due to the defaulted attribute in the presence of standalone='yes'.
  A parser which does not fetch the external subset has no way to 
discover the error and consider it well-formed.

  standalone is IMHO historical garbage which should never have made it
to the spec, it confuses and led more to errors than any garantee it can
provide. Too bad we have to live with it now.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 
Received on Thursday, 12 August 2004 12:20:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:22:04 GMT