W3C home > Mailing lists > Public > xml-editor@w3.org > April to June 2002

Re: Standalone document VC and WFC inconsistency

From: Karl Waclawek <karl@waclawek.net>
Date: Wed, 19 Jun 2002 09:47:07 -0400
Message-ID: <002701c21797$cd9b1af0$9e539696@citkwaclaww2k>
To: "Rob Lugt" <roblugt@elcel.com>
Cc: <public-xml-testsuite@w3.org>, <xml-editor@w3.org>

> I wrote
> > Perhaps you give a little example of a standalone document that
> > you think has these attributes?
> >
> I have been experimenting with this a little further, and I think I've
> devised a test case that pinpoints the VC: Standalone Document:
> <?xml version="1.0" standalone="yes"?>
> <!DOCTYPE test [
> <!ENTITY % pe "
>        <!ENTITY x 'x'>
>        <!ATTLIST test foo CDATA '&x;'>
> " >
> %pe;
> ]>
> <test foo='x'/>
> Do you agree this test file is
> a) well-formed

Yes - it passes my re-written WFC.

> b) invalid, for the only reason that the default value for parameter foo
> refers to &x; which is 'externally' declared.

Re-reading the VC:
The standalone document declaration must have the value "no" if any external
markup declarations contain declarations of:
  a.. attributes with default values, if elements to which these attributes apply appear
      in the document without specifications of values for these attributes, or
  b.. entities (other than amp, lt, gt, apos, quot), if references to those entities
      appear in the document, or

I would say this is invalid because of b).
It hinges on what "if references to those entities appear in the document"
means. I would say that the internal subset is part of the document.
Otherwise it should have said: "document content", am I right?

I believe you could actually convert it to a VC violation of a).
Leave out the attribute value in the element, and just write <test/>,
the entity x declaration would not be necessary either, like this:

<?xml version="1.0" standalone="yes"?>
<!DOCTYPE test [
<!ENTITY % pe "
       <!ATTLIST test foo CDATA 'something'>
" >

Still wellformed, but invalid, IMO. What do you think?

Received on Wednesday, 19 June 2002 09:47:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:37:41 UTC