What is a document?

Mark Birbeck Mark.Birbeck at iedigital.net
Thu Nov 25 19:33:04 GMT 1999

Don Park wrote:
> Mark Birbeck replied:
> >Not true - XML Fragment Interchange suggests a simple way to 
> >do all that you say.
> Mark, I think you misinterpreted the XML Fragment Interchange spec.
> It suggest a way to provide context information about a fragment
> of an existing document.

No - I didn't misunderstand the spec. Your first message said:

> By its nature, a fragment is likely to be missing some
> information (parameters if you will) that must be provided
> by the context.  We currently have no mechanism to do
> this but we will need it eventually.

and I believe that what you said *is* addressed by the FI spec.

However, in your follow up you indicate that you meant something
different from that initial message. You wrote:

>  I was talking about some means to specify and constrain
> where a standalone fragment (meaning that it is not a
> complete document and is also not part of another document)
> may be used and what context information is needed to use it.

This is different. Surely a fragment's applicability or otherwise comes
from the schema of the containing document, not the fragment itself?
Have you some scenarios in mind where the fragment should limit where it
can appear, rather than a schema or DTD doing that job?

Anyway, here are a few notes to illustrate the use of fragments. With
this in my database:

	<nitf ID="1">
					<hl2>The headline</hl2>

I have a system where this URL:


returns simply:

	<hl2>The headline</hl2>

More fun is that before I send out the resulting XML I have a quick look
for rdf:resource attributes, so this, in the database:

	<rdf:Description about="http://xyz/articles/nitf[ID=1]">
		<dc:Creator resource="http://xyz/people/x:person[ID=1]"

will become this (namespace declarations are present, just excluded
here) on delivery:

  <rdf:Description rdf:about="http://xyz/articles/nitf[ID=1]">
      <x:person ID="1">
            <vcf:fn>Mark Birbeck</vcf:fn>
            <vcf:extref vcf:uri="http://library/MB.jpg" />

Now, whether the vCard/x:person fragment can appear as a child of
dc:Creator is up to the container definitions, not up to vCard. (I'm
being loose with my interpretation of dc:Creator during the development
of this system, but ignore that!) In this case vCard *can* be a child of
x:person, and a grandchild of dc:Creator, since the relationships are
RDF statements, not ordinary XML.

All I'm asking then, is, what situations do you see in which the
fragment itself - say the vCard or x:person in my scenario - must
indicate where it can and cannot appear? I think that to do that would
be a major change from the approach that DTDs and XML normally works
(defining the valid children, not the valid parents). The examples I've
given above show how fragments of other XML documents can be
incorporated within an XML document, and how XPath can be used a syntax
that allows you to specify that.

Best regards,


Mark Birbeck
Managing Director
x-port.net Ltd.
220 Bon Marché Centre
241-251 Ferndale Road
w: http://www.iedigital.net/
t: +44 (171) 501 9502
e: Mark.Birbeck at iedigital.net

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 unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe 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