Foreign object inclusion WAS: Namespaces, Architectural Forms, and Sub-Documents

David Megginson ak117 at freenet.carleton.ca
Thu Feb 5 14:09:49 GMT 1998


Gavin McKenzie writes:
 > 
 > David Megginson wrote:
 > > [snip]
 > > XML documents may (and perhaps, usually will) contain non-XML objects
 > > such as wordprocessor documents, spreadsheets, MPEG clips, Java
 > > applets, audio sequences, and many others -- to date, thankfully, no
 > > one has proposed uuencoding any these and dumping them inline between
 > > a start and and tag.
 > > [snip]
 > 
 > Am I to understand from this paragraph that there would be
 > something wrong with uuencoded or base64'd resources, like audio
 > clips or even a Java class, between a start and end tag?

You are quite right that this is legal XML or SGML -- that's one valid
use of NOTATION attributes. Here's this paragraph UUENCODED:

<object notation="uuencoded">
begin 644 para
M66]U(&%R92!Q=6ET92!R:6=H="!T:&%T('1H:7,@:7,@;&5G86P at 6$U,(&]R
M(%-'34P at +2T@=&AA="=S(&]N92!V86QI9`IU<V4@;V8 at 3D]4051)3TX at 871T
J<FEB=71E<RX at 2&5R92=S('1H:7,@<&%R86=R87!H(%5514Y#3T1%1#H*
`
end
</object>

It reflects well on XML that this is possible.

 > I thought this would be a given.  Sure using XLL or simple url
 > hrefs are great, but many times the requirement is for a single
 > file with all resources literally included.

I don't see that there is any long-term advantage to that -- in the
short-term, it will work around some temporary short-comings in specs
and implementations, but it's the equivalent of writing an entire C
program in a single file to save time on linking (or even all in
main(), to avoid the overhead of subroutines).  Modularity and
encapsulation have already proven their worth in the programming
world, and they will prove their worth in XML as well.

In other words, inlining uuencoded objects is a kludge: by all means,
do it in your implementations if you plan to ship soon and need to
work with the current generation of software and Internet protocols,
but recognise that you are creating maintenance headaches for yourself
later on (as I have for myself by forcing AElfred into a single Java
class file), and **PLEASE** do not codify kludges in standards.


All the best,


David

-- 
David Megginson                 ak117 at freenet.carleton.ca
Microstar Software Ltd.         dmeggins at microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

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