Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Well-formedness and undeclared general entity references

From: Stanimir Stamenkov <s7an10@--------.--->
To: NULL
Date: 4/10/2009 4:17:00 PM
Fri, 10 Apr 2009 14:43:32 +0200, /Martin Honnen/:
> Stanimir Stamenkov wrote:
>
>> Is an XML document using undeclared general entity references not 
>> well-formed?  For example:
>>
>> <test>
>>   foo
>>   &bar;
>> </test>
> 
> See http://www.w3.org/TR/xml/#sec-references:
>   "Well-formedness constraint: Entity Declared
> 
> In a document without any DTD, [...] for an entity reference that does 
> not occur within the external subset or a parameter entity, the Name 
> given in the entity reference MUST match that in an entity declaration 
> that does not occur within the external subset...

If I have "document without any DTD" the wording "the Name given in 
the entity reference MUST match that in an entity declaration that 
does not occur within the external subset" is somewhat confusing for 
me as there's obviously no external subset.   The other cases 
(stripped from the quotation): "a document with only an internal DTD 
subset which contains no parameter entity references, or a document 
with standalone='yes'" seems fine, but see my other message in this 
thread regarding the paragraph following the quoted one in the 
specification:

> Note that non-validating processors are not obligated to read and 
> process entity declarations occurring in parameter entities or in 
> the external subset; for such documents, the rule that an entity 
> must be declared is a well-formedness constraint only if 
> standalone='yes'.

Even if I specify standalone='no' for the given example the parsing 
fails for me (again, I'm using Xerces2-J for what is worth).

-- 
Stanimir


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent