Problems with Entities (was re:Embed and validation)

Rick Jelliffe ricko at allette.com.au
Thu Dec 4 03:20:58 GMT 1997


 
> From: Rob McDougall <RMcDouga at JetForm.com>


> (1) Declarations must be performed near the top of the file.
> (2) Declarations should be performed near where they are used.

There has been a proposal for inline declarations recently.  They would
use declaration syntax but be inside a processing instruction, e.g.
 <?IS8879 ELEMENT dog (nose, leg+, tail) ?>

(This, I believe, will not be in WebSGML, now being finalized.  But it
may make it through the big SGML revision which looms.)

> I realise this inflexibility is something that has been inherited from
> SGML, but I worry that this will impede XML's adoption into the
> marketplace.  This is the second time I've had to reject using XML's
> entity substitution capabilities because of the need to declare all your
> entities at the top of the file.  I originally had wished to use the
> entity substitution as a text substitution, but unfortunately, my users
> will want to "re-define" the value of an entity several times throughout
> the file.  This cannot be done using XML entities.

In XML, the system identifier of an entity is a URI.  This can include
a query.  The query can trigger an update of the value.

There is no way to update the value of an external entity dynamically in
XML, but that is because it is not a programming language.  However, you
can markup that you want updates to take place.  For example, if the
text was a running header, you could have an element like
	<running-header>blah</blah>
and make your software update the entity every time it was found. If you
want to embed this more clearly into your document, you could use a processing
instruction, for example
	<?RicksScript Header="blah"; ?>

Use entities to bring data in and PIs to send messages out.

Rick Jelliffe

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list