RE: Representing NOTATIONs in XML Schema?

> -----Original Message-----
> From:	Roger L. Costello [SMTP:costello@mitre.org]
> Sent:	Tuesday, July 02, 2002 2:49 PM
> To:	xmlschema-dev@w3.org; Costello,Roger L.
> Subject:	Re: Representing NOTATIONs in XML Schema?
> 
> 
> Thanks Asir, Dare, and Ross!
> 
> Okay, DTD NOTATIONs are different than XML Schema NOTATIONs.  The
> obvious next question is "how are they different"?  As my clients
> migrate their NOTATION-containing DTDs to XML Schemas how are they to
> migrate the NOTATIONs?  /Roger
> 
NOTATIONS in XML Schema are a superset of NOTATIONS in DTD.  How so?

As detailed in section 3.12.2 of structures [1], all notations declared in a schema have a targetNamespace (i.e., they are namepsace qualified).  NOTATIONS in DTDs are not qualified (that is, their names must be Names [3] and are not interpreted as QNames.  Thus, to mimic DTD functionality, all you need to do is make sure that the schema that defines the notations has no targetNamespace.

Dare's comment that the system and public identifiers for NOTATIONS in DTD don't have to be URI's is not quite correct.  As described in section 4.2.2 of XML 1.02e [2], the system identifier is a ***URI reference*** (which equates to anyURI).  In the same section, XML 1.02e says the following about the public identifier:

	[Definition: In addition to a system identifier, an
	external identifier may include a public identifier.]
	An XML processor attempting to retrieve the entity's
	content may use the public identifier to try to generate
	an alternative URI reference.

Thus, the public identifier doesn't have to be a URI reference, but could be, since there is no required format for public identifiers.  Of course, those who use NOTATIONS in DTDs usually follow a convention of (formal) public identifiers from SGML  Its been too long since I've read the SGML spec's description of an FPI, but as far as I can remember, the public identifier is "probably" a legal relative URI, and hence "should" be a valid anyURI.  Althought, I think this points out that we might want to reconsider whether the public identifer of schema notations should really have been a string instead of anyURI (I'll raise this with the WG).

pvb

Received on Wednesday, 3 July 2002 20:49:00 UTC