[XML-SIG] Using PyExpat.py

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon, 19 Feb 2001 23:38:24 +0100


> Most XML processing specifications mandate that the URI of the XML
> entity that contains an infoset node is used as the basis for
> further processing.

I agree. The XML recommendation is quite clear about this:

# The SystemLiteral is called the entity's system identifier. It is a
# URI, which may be used to retrieve the entity.

So in XML, a system identifier is an URI, even though in SGML, it is
system dependent (as the name suggests). It goes on

# Unless otherwise provided by information outside the scope of this
# specification (...), relative URIs are relative to the location of
# the resource within which the entity declaration occurs. A URI might
# thus be relative to the document entity, to the entity containing
# the external DTD subset, or to some other external parameter entity.

So if a document was downloaded from
http://www.python.org/xml/foo.xml, and encounter a system identifier
of "../bar/bar.dtd", it MUST be interpreted as
http://www.python.org/bar/bar.dtd.

Regards,
Martin