public/catalog [was: Re: ERB Decisions of March 26th]
> From: bosak@atlantic-83.Eng.Sun.COM (Jon Bosak)
> | > Yes, allow PUBLIC: Kimber, DeRose, Sperberg-McQueen, Maler, Hollander
> | > No, no PUBLIC ID: Paoli, Sharpe, Magliery, Clark, Bray, Bosak
> | >
> | >So in this draft, no public IDs. It should be voted that *every person*
> | >on the No side would change their vote to Yes if there was an agreed-on
> | >resolution mechanism for PUBLIC identifiers.
> It should be noted that all the NO votes were "no, not ready for this
> particular draft, we need to agree on a resolution mechanism before we
> can include public identifiers." There is general agreement that XML
> will have public identifiers, but there has to be general agreement on
> a resolution mechanism before it shows up in the spec. XML 1.0 has a
> long way to go before it achieves "recommended" status. This feature
> just isn't cooked yet.
Here is a quick rewrite of the XML catalog proposal with the extras
removed. I don't know if this helps cook it or just adds too many chefs,
but it provides something concrete and as simple as seems possible.
--------- Section 4.2.2 "External Entities" in Working Draft 14-Nov-96
[69'] ExternalID := 'PUBLIC' S PublicID ( S SystemLiteral )? |
'SYSTEM' (S SystemLiteral)?
[70a] PublicID := RestrictedLiteral
[70b] RestrictedLiteral :=
'"' RestrictedLiteralChars '"' | "'" RestrictedLiteralChars "'"
[70c] RestrictedLiteralChars := (Letter | Digit | S | SpecialChars)*
[70d] SpecialChars := ['()+,-./:=?]
The PublicID is called the entity's public identifier. The SystemLiteral
that may follow the entity's public identifier and the SystemLiteral that
may follow the SYSTEM keyword are called the entity's system identifier.
When an XML processor encounters an external entity defined by a public
identifier, the processor determines the associated system identifier
from a supplemental XML catalog (see 4.3.1).
If the XML processor cannot successfully use or resolve the public
identifer, and a system identifier follows the public identifier, the
XML processor shall behave as if the system identifier was the only
identifier supplied. If the XML processor cannot successfully use or
resolve the public identifier, and a system identifier does not follow
the public identifier, the XML processor shall behave as if a system
identifier could not be resolved.
The system identifier is a URL, which may be used to retrieve...
[[continues as in XML WD 1.0]].
- - - - - - - - - - - - - -
4.3.1 XML Catalog Specification
[C1] XMLCatalog := S? ( ( catComment | catEntry )
( S ( catComment | catEntry ) )* )?
[C2] catComment := '--*' ... '*--'
[C3] catEntry := catPublic | catOtherEntry
[C4] catPublic := 'PUBLIC' S PublicID S SystemLiteral
[C8] catOtherEntry := catKeyword ( S SystemLiteral )+
[C9] catKeyword := [^S"'./\<>] [^S./\<>]*
An example of several catalog entries follows:
PUBLIC "ISO 8879:1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml"
PUBLIC "-//ACME//DTD Report//EN" "http://www.acme.com/dtds/report.dtd"
The PublicID is the public identifier (see also production 70a)
of the entity or notation. A catPublic entry maps a PublicID
into a SystemLiteral used to locate the entity (see production 70).
Because public identifiers are used as "match indices" into catalogs,
an "interpreted" value is defined that is used in the matching
process. The public identifiers from the ExternalID production as well
as the PublicID from the catPublic catalog entries undergo this
interpretation prior to any matching being attempted. This
interpretation consists of removing the surrounding quotes, deleting
all leading and trailing white space, and replacing all embedded
sequences of occurrences of white space (see production 1) with a
single space (#x0020) character.
When the interpreted value of the public identifier of an ExternalID
(production 69) exactly matches the interpreted value of the public
identifier of a PUBLIC type catalog entry, that catalog entry associates
its right hand side (SystemLiteral) with the given entity or notation.
The first such exact match terminates the catalog lookup process.
All catOtherEntry entries have no effect prescribed by this XML
specification, though individual implementations may recognize
and operate on any or all of them.