Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Well-formedness and undeclared general entity references

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 4/10/2009 2:44:00 PM
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 or a parameter entity, 
except that well-formed documents need not declare any of the following 
entities: amp, lt, gt, apos, quot."

If you don't have a DTD, not even an internal subset, then you can only 
reference the predefined entities (amp, lt, gt, apos, quot). An entity 
reference to anything else violates well-formedness.


> If yes, what's the difference given using a non-validating processor and 
> the given example:
> 
> <!DOCTYPE test SYSTEM "empty.dtd">
> <test>
>   foo
>   &bar;
> </test>
> 
> Where "empty.dtd" is really an empty file.

Not sure about that one.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/


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