Re: Foreign object inclusion WAS: Namespaces, Architectural

Peter Murray-Rust (peter@ursus.demon.co.uk)
Fri, 06 Feb 1998 08:45:27


I am still unclear how to tackle this (very real) problem. I have sympathy
for people who wish to bundle everything into one document because I am not
yet happy that we have a completely robust system for bundling together all
components of a hyperdocument. [For example, how often do you "save HTML"
and find the GIFs are not included?].

When I first started trying to learn SGML I developed a system (costwish)
which UUENCODED gifs and other binaries into a single. Since I have no
experience of SGML in practice I don't know whether that is the normal
thing to do.

When I came across something like the following:

At 08:23 06/02/98 +1100, Marcus Carr wrote:
>David Megginson wrote:
>
>> 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@6$U,(&]R
>> M(%-'34P@+2T@=&AA="=S(&]N92!V86QI9`IU<V4@;V8@3D]4051)3TX@871T
>> J<FEB=71E<RX@2&5R92=S('1H:7,@<&%R86=R87!H(%5514Y#3T1%1#H*
>> `
>> end
>> </object>

I converted all the & to &amp; and the < to &lt;

I'm not clear why this isn't a useful method since the processor is
required to convert them on reading.

I have a problem to know what to do with "save XML" on JUMBO. In the
SAXDemo routine characters(), DavidM converts non printing chars to escaped
variants *e.g. asc(10) -> &#10; , but does *not* convert & to &amp; This
means that any XML file that contains & will produce invalid XML output.

What is the appropriate strategy? Should a "save XML" application convert
all five chars (&, <, >, ', ") to their escaped equivalents? Or none? Or
just the first two. [In my own community I don't think using <![CDATA[ is a
good idea because people won't have any idea what is going on and they will
get it wrong. In any case - as pointed out - it doesn't overcome the
random occurrence of ']]>' ].
>

P.

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg