- From: Karl Waclawek <karl@waclawek.net>
- Date: Tue, 18 Jun 2002 10:18:34 -0400
- To: "Rob Lugt" <roblugt@elcel.com>
- Cc: <public-xml-testsuite@w3.org>, <xml-editor@w3.org>, <rolf@pointsman.de>
> Recent changes to the XML Conformance Tests have highlighted an > inconsistency in the XML rec regarding standalone documents and external > entity declarations. > > The conformance test changes have re-classified 3 test files from validity > error to not-wf. These files contain a standalone="yes" declaration, yet > reference entities which are declared in the external DTD subset. > > Karl Waclawek has pointed out that this condition represents a > well-formedness error because it falls foul of WFC: Entity Declared. > > I agree with Karl's interpretation, but the rec also makes this a validity > error. The second item in the bullet list in VC: Standalone Document > Declaration states that a document should not reference an > externally-declared entity from within a standalone document. > > I presume that the WFC should take precedence over the VC and, for clarity, > the VC should therefore be removed. Do you agree? Maybe there is a slight difference. First, a quote from the VC: Standalone Document Declaration <quote> The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: a.. entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or </quote> Now a re-written version of the WFC: Entity Declared, which also takes the erratum into account. (I rewrote it for my own understanding - so this reflects my personal understanding of it, which could be wrong, of course). <quote> First, I split the problem into two questions: 1) *When* should one check if a reference matches an entity declaration in the right location? This is different depending on whether the reference is in the DTD or the document content, DTD: The reference is in the internal subset, and: a) If standalone = "yes": the reference is outside of any PE b) If standalone = "no" oder undefined: So far no PE has been read (which implies the reference is outside of any PE) Document content: A) The document has no DTD B) The document has only an internal subset, and this subset contains no PE references C) standalone = "yes" 2) What should one check then? DTD *and* document content: An entity declaration with matching name was read, which is in the internal subset, but outside of any PE (which is automatically given in case 1)-DTD-b)). DTD: GE references in default attribute values must come after the matching GE declaration </quote> It seems, that in the WFC, if standalone="yes", but the reference is inside a PE in the internal subset, then there is no requirement for a matching entity declaration at all. I.e. it says nothing about such references pointing to an external declaration. I would say then that the VC: Standalone Document Declaration adds some extra constraint and is not totally redundant. But that is my personal interpretation. Karl
Received on Tuesday, 18 June 2002 10:18:37 UTC