469,352 Members | 1,811 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

Missing entitites - Invalid or not well-formed ?

Suppose I have a XML document, in a format such as RSS.
I then use a reference to a well-known HTML entity, such as é

Clearly this isn't "correct" (the entity is unknown) - but is this
an error of well-formedness (i.e. at the XML level) or an error of
validity (incompatible with the referenced schema) ?

Jul 23 '05 #1
3 1930
Andy Dingley wrote:
Suppose I have a XML document, in a format such as RSS.
I then use a reference to a well-known HTML entity, such as é

Clearly this isn't "correct" (the entity is unknown) - but is this
an error of well-formedness (i.e. at the XML level) or an error of
validity (incompatible with the referenced schema) ?

It is not well-formed: it is a syntax error, an unknown entity.
Validation is more of a lexical (meaning) test.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 23 '05 #2
* Andy Dingley wrote in comp.infosystems.www.authoring.html:
Suppose I have a XML document, in a format such as RSS.
I then use a reference to a well-known HTML entity, such as é

Clearly this isn't "correct" (the entity is unknown) - but is this
an error of well-formedness (i.e. at the XML level) or an error of
validity (incompatible with the referenced schema) ?


If the document does not refer to a document type definition this would
be a fatal error for the processor, see the entity declared constraints
in the XML 1.0 Third Edition Recommendation.
Jul 23 '05 #3
In article <po********************************@4ax.com>,
Andy Dingley <di*****@codesmiths.com> wrote:
Suppose I have a XML document, in a format such as RSS.
I then use a reference to a well-known HTML entity, such as &eacute;

Clearly this isn't "correct" (the entity is unknown) - but is this
an error of well-formedness (i.e. at the XML level) or an error of
validity (incompatible with the referenced schema) ?


That depends.

If there is no external DTD, and standalone="yes" is not specified,
then it is only a validity error. The reason for this is that a
parser that doesn't read the external DTD can't be sure that there
isn't a declaration there.

If there is no external DTD, or standalone="yes" is specified, then
any processor can be sure that there isn't a declaration, and the
error is a well-formedness error.

Bear in mind that even if it's "only" a validity error, many programs
will not be able to process such a document because they require fully
expanded documents. XSLT is a typical example of this.

Also bear in mind that DTD validation is the only kind of validation
related to entity declarations. Other schema mechanisms (XML Schemas,
RelaxNG, Schematron etc) do not address this issue because they are
not tied in to parsing in the way that DTD validation is.

-- Richard
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Safalra | last post: by
5 posts views Thread by Analysis&Solutions | last post: by
3 posts views Thread by Samem N via DotNetMonster.com | last post: by
12 posts views Thread by John Sidney-Woollett | last post: by
8 posts views Thread by Elijah Cardon | last post: by
3 posts views Thread by Fred Chateau | last post: by
2 posts views Thread by Joe Kovac | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.