[Home] [By Thread] [By Date] [Recent Entries]
This from the man who gave us the InfoSet. Tell me, please, what the data model is for this. Because my mental view of it looks something like a Klein bottle. Michael Kay > -----Original Message----- > From: Richard Tobin [mailto:richard@c...] > Sent: 21 October 2003 15:14 > To: xml-dev@l... > Subject: Alternative "character entity" proposal > > > This is a proposal for a new mechanism for declaring internal > entities, requiring a new version of XML. > > [I am not proposing this because I think it's a good idea - I > can't see a good solution at all - but because it's an > obvious approach that several people have talked to me about > at W3C meetings and which has not been discussed in the > recent threads on the subject. Henry Thompson proposed a > similar mechanism a few years ago.] > > Since XML 1.0, replacements have been invented for most > aspects of DTDs: > > - content restriction and typing is provided by XML Schemas, > Relax NG, > Schematron etc > > - something similar to external entity inclusion is provided > by XInclude > > - ID-ness is being addressed by the current work on xml:id > > In each case the replacement uses (or can use) XML instance > syntax rather than DTD syntax. > > The obvious missing item from the list is internal entities, > especially in their use as names for characters. > > In theory, XInclude can replace internal entities. The href > in an xinclude element can refer to a fragment of the same > document. But this is hardly convenient: it is very verbose, > and you have to find somewhere to put the text itself. > XInclude works well for merging small documents into a large > document, but not so well for defining frequently-used short > sequences of characters. > > The proposal is to continue to use the existing entity > reference syntax, while providing a new way to declare > entities. The declarations would use XML instance syntax, > and be scoped to allow multi-vocabulary documents where the > vocabularies have their own entity sets - in particular, it > is not necessary to change the prolog or higher-level > elements to include a fragment which uses its own entity set. > > The syntax for declaring a single entity is an attribute of the > form: > > xmlent:eacute="é" > > Within the scope of the element with that attribute, é > will refer to the e-acute character. > > The replacement text is not restricted to a single character: > > xmlent:author="Richard Tobin" > > A file of entity declarations can be specified by an attribute of the > form: > > xmlentfile="http://example.org/ents" > > or more than one file: > > xmlentfile="http://example.org/ents1 http://example.org/ents2" > > These files must contain a single element, whose name is > arbitrary, and that element may have xmlent:* and xmlentfile > attributes. All the entities declared in the file (and > recursively) are in scope within the element with the > xmlentfile attribute. > > Within the scope of such declarations, references to the > entities are both well-formed and valid. This implies a new > XML version number. > > There are many variations possible: the single inline > declaration could be removed; the file syntax could use > elements, the entity names could be namespaced, and so on. > The key point is to have a scoped mechanism for declaring > internal entities using xml-instance syntax. > > -- Richard > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org > <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl>
|

Cart



