Documents and Document Fragments

Tim.Shaw at wdr.com Tim.Shaw at wdr.com
Wed Feb 24 16:36:38 GMT 1999


     

I maybe don't quite understand this - my apologies if I'm missing something.

A document fragment is a lightweight document (as defined by W3C 
REC-DOM-Level-1-19981001). These fragments may be used for numerous purposes - 
including creating (by 'insertion') other documents.

A document fragment need not be WF - but (presumably) they must represent at 
least one <tag></tag> type construct as they are also Nodes

Surely it's down to the parser as to whether you can access these things before 
the XML document has been fully parsed (and they are _not_ Valid XML 1.0 
documents(?)). The parser can still be XML 1.0 conformant - but it would need to
provide non-conformant interfaces to allow interim access.

NB This is somewhat DOM-centric, but the definitions do exist :-)

tim
______________________________ Reply Separator _________________________________
Subject: RE: Documents and Document Fragments
Author:  Mark.Birbeck (Mark.Birbeck at iedigital.net) at unix,mime
Date:    24/02/99 15:38


     
     
> -----Original Message-----
> From: Nathan Kurz [SMTP:nate at valleytel.net] 
> Sent: Tuesday, February 23, 1999 11:13 PM
> To:   xml-dev at ic.ac.uk
> Subject:      RE: Documents and Document Fragments 
> 
> Mark Birbeck wrote:
> > It's also relevant to document fragments. In previous posts, I was 
> > trying to say that as far as a parser is concerned, whether it
> receives
> > a complete XML document by retrieving a file from a disk, a page 
> from a
> > web server, or four nodes from an object database is neither here 
> nor
> > there. As far as it is concerned, it has an 'XML document'. I called 
> > this a 'logical' document because I wanted to indicate that it may
> not
> > actually exist in any physical form, but it is a
> > 'data-object-that-conforms' item, and that if we can process an 'XML 
> > document' we can process one node, many nodes or the whole tree. You 
> > don't then need to devise another system to process well-formed
> > 'uberdocuments', and yet another to process well-formed 'document 
> > fragments' or 'microdocuments' or whatever.
> 
> Although it may reflect the state of existing parsers, I disagree with 
> this assessment of how XML parsers must relate to 'XML documents' and 
> 'document fragments'.  It seems like it has things backwards.  You
> imply that if a parser is able to process a collection of nodes in one 
> particular form, that it is able to process a collection of nodes in
> any arrangement whatsoever.  Perhaps, but not necessarily. 
> 
        I think that 'document fragment' *is* a useful term once you are
'inside' the parser. In other words, when you get to the point where you 
are processing the physical XML document and want to discuss aspects of 
this it is helpful to draw a distinction between the entire document and 
pieces of it.
     
        I don't think it helps though in the prior process of delivery
of information to the parser. As far as I can see in XML 1.0, you can 
only deliver a well-formed document to a parser. And even if you have a 
database of lots of nodes that you combine to make into XML documents, 
you've still presented 'complete' documents to the parser, not 
'fragments' or 'microdocuments'.
     
        In all my comments, my objection is always the seeming
willingness of everyone to introduce extra terminology to supposedly 
'clarify', when it is unnecessary, and often confuses.
     
        Regards,
     
        Mark
     
     
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/ and on CD-ROM/ISBN 981
-02-3594-1
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)


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/ and on CD-ROM/ISBN 981-02-3594-1
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