OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Streaming XML (Was RE: XML Information Set Requirements, W3C Note 1

[ Lists Home | Date Index | Thread Index ]
  • From: Mark Birbeck <Mark.Birbeck@iedigital.net>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • 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
everything.

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):
> 
> [32] Standalone Document Declaration
> [56] IDREF
> [56] Entity Name (detectable at end of DTD)
> [58] Notation Attributes (detectable at end of DTD)
> 
> Have I overlooked anything?

Er, well, yeah ... [1]!!

Regards,

Mark

Mark Birbeck
Managing Director
Intra Extra Digital Ltd.
39 Whitfield Street
London
W1P 5RE
w: http://www.iedigital.net/
t: 0171 681 4135
e: Mark.Birbeck@iedigital.net

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS