This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7007 - WFC Entity Declared and standalone documents
Summary: WFC Entity Declared and standalone documents
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: 0.8.6
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-09 14:40 UTC by Giovanni Campagna
Modified: 2010-03-02 18:58 UTC (History)
0 users

See Also:


Attachments

Description Giovanni Campagna 2009-06-09 14:40:40 UTC
While validating an XML document, the violation of WFC Entity Declared ( http://www.w3.org/TR/xml/#wf-entdeclared ) is not reported if the entity is declared in the external subset, even if the document is declared as "standalone=yes".

An example of this behaviour:

<?xml version="1.0" encoding="uft-8" standalone="yes"?>
<!DOCTYPE test SYSTEM "http://example.org/test.dtd"><test>&test;</test>

where test.dtd contains:
<!ENTITY test "test content">
<!ELEMENT test (#PCDATA)*>

is considered valid by the markup validator, but it should be a Fatal Error according to XML, because the document is not well-formed (and thus cannot be valid).

(Tested using the version online at validator.w3.org)
Comment 1 Ville Skyttä 2009-12-14 21:22:17 UTC
All undefined entity errors from XML::LibXML were explicitly filtered out to avoid noise because the XML::LibXML preprocessor does not currently load external DTDs in any case; the development version no longer filters them out for standalone documents.
Comment 2 Ville Skyttä 2010-03-02 18:58:57 UTC
Fix included in 0.8.6.