Re: Whitespace

In message <199705080215.AA23785@mail.crl.com> Joe English writes:
> 
[...]
> > this is unworkable, [...]
> 
> 
> AFAIK, the only way to make sure that DTD-aware and DTD-unaware
> processors produce the same results in the presence of element content
> is to avoid inserting any "insignificant" whitespace.
> 
> Would it be acceptable to write the instance as:
> 
>     <CML
>     ><XVAR
>     >A variable</XVAR
>     ></CML>
> 
> instead?

Yes :-)

This shows the classic case of someone (me) who has had no formal acquaintance
with SGML (apart from this marvellous virtual community) going through yet 
another bit of learning curve.  I'd been wondering why some of the SGML files 
had this format - it looks ugly - and I'd totally failed to realise that it 
was a way round the whitespace problem.  It's doubtless one of those little
tricks that people learn at their first tutorial, except I never had one.
And I don't use SGML authoring tools, because they aren't really relevant
unless they are bespoke and therefore expensive.  

The message is that there will be a lot of people in my position, who need
very careful guidance on how to create XML files which follow good style.
It's not sufficient to leave these to authoring tools, since many people
(like me) will create their own XML output directly from programs (which
is where I expect most CML to come from.)  

Since I shall be evangelising the molecular community about the power of XML,
and was in grave danger of teaching them some poor practice, I would strongly
recommend a guide for XML authors.  I know it's important to get the 
language right first, but it will save a huge amount of problems in the 
future if people can be shown how to avoid avoidable dangerous constructions.

	P.

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

Received on Thursday, 8 May 1997 18:22:18 UTC