Lists Home |
Date Index |
- From: Mark Birbeck <Mark.Birbeck@iedigital.net>
- To: XML Dev <firstname.lastname@example.org>
- Date: Mon, 22 Feb 1999 19:24:52 -0000
John Cowan wrote:
> Mark Birbeck wrote:
> > The question is whether it is legitimate to open a stream
> > of XML with some sort of element like:
> > <stockPrices>
> > and then spend the rest of the day sending out things like:
> > <stockPrice>
> > <ticker>MSFT</ticker>
> > <price>1000</price>
> > </stockPrice>
> > and then at the end of the day, sending:
> > </stockPrices>
> > No-one so far in the discussion has argued that this is good XML -
> I so argue. It is well-formed, though not valid, XML.
It's NOT well-formed until the end of the day, when you receive the
closing tag. Until that time 'stockPrices' is not a complete element,
and therefore not a complete XML document.
> Validity inherently can't be checked until you've processed
Nor can well-formedness.
> It might be interesting to define the subset of validity that can
> be checked on the fly, though.
I think you're barking up the wrong tree here. This violates the whole
basis of XML - and is completely unnecessary anyway. If I receive an
element that completely matches the DTD requirements for that element,
and then my processor acts on it - say, by updating a stock control
system - and then I receive another element of the same type, but the
parent element has a DTD entry that says it can have only one node of
this type, then my document is invalid for that DTD - even though the
'subset' is valid. What does your processor do now? Undo the stock
update and roll back to the previously nested 'state of validity'? Abort
the entire document undoing everything on the way? Cry?
A consistent theme in this discussion forum is that people always want
every major breakthrough that has been made by XML to be removed, under
the pretence of coping with some 'special circumstances'. If you think
about it, it is quite unique in the history of software engineering to
have an agreed standard which allows us to check whether a document that
we had no part in designing the layout for, is valid. In the past if I
wanted to check the validity of a Word or Excel document, or Director
shows, or Zip files, I'd need to know their internal - and proprietary -
format in advance. And if Microsoft, or Macromedia, or whoever, changed
them, I'd need to change my software. Yet with XML all you have to do is
put in the head of your document what DTD you are using and I can
validate it. Now everyone wants to throw that away and have open-ended,
infinite documents that are made up of smaller subsets of validity! We
could already do that before XML 1.0 - it's not difficult!
> My first cut at it says that all VCs except the following can be
> checked given the full left context (in stream terms, all that
> has come before):
>  Standalone Document Declaration
>  IDREF
>  Entity Name (detectable at end of DTD)
>  Notation Attributes (detectable at end of DTD)
> Have I overlooked anything?
Er, well, yeah ... !!
Intra Extra Digital Ltd.
39 Whitfield Street
t: 0171 681 4135
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)