words (RE: extensibility in XSchema?)
Rick Jelliffe
ricko at allette.com.au
Thu Jun 25 15:48:26 BST 1998
> From: james anderson
> i thought you could do this with unparsed
> (that is, external) entities only.
> (i don't understand why, but that's what
> i thought the rec says) ?
> and, what's the difference between the cited example and the
> following (modulo validation constraints)?
>
> <!ATTLIST object PI CDATA #IMPLIED >
> <object PI="&x">A wooden horsey</object>
Oops, I made a big mistake here--whatever I was thinking of
it wasnt XML. Apologies and embarrassment. At the risk of putting
more feet in my mouth, here are two other methods for your
dissection.
Yes, XML only has external entities for ENTITY attributes,
and these are not parsed, except by some additional contraint.
(I think I was distracted by SGML, which can label entities as PIs,
rather in the fashion of professional wrestler George "the Animal"
Steele, who would be distracted by the turnbuckle and try to eat
it at critical moments in a match.)
So here is a better attempt:
<!ENTITY xxx "xxx.jar#xxx">
<!ATTLIST object PI ENTITY #IMPLIED >
...
<object PI="xxx">a wooden horse</object>
In this case the external, unparsed entity would be a code
fragment. So "object" has an attribute which names
an entity which is declared as being the resource which
is a fragment of that java archive. (I wouldn't have to use
fragment identifiers, I could have one PI per external file.)
The MIME headers returning the resource give the equivalent
information to the PI target (notation). So there is still
a way to associate external processing instructions to XML
elements.
I suppose an alternative leaves using an XLink href attribute to
point to a PI given previously in the document (if XPtr ends
up being able to locate PIs), though. But that is not XML.
Rick.
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