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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: What is a document?

[ Lists Home | Date Index | Thread Index ]
  • From: Mark Birbeck <Mark.Birbeck@iedigital.net>
  • To: 'XML Dev' <xml-dev@ic.ac.uk>
  • Date: Thu, 25 Nov 1999 18:59:47 -0000

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">
		<body>
			<body.head>
				<hedline>
					<hl2>The headline</hl2>
				</hedline>
			</body.head>
		</body>
	</nitf>

I have a system where this URL:

	http://xyz/articles/nitf[ID=1]/body/body.head/hedline/hl2

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]"
/>
	</rdf:Description>

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

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

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

Mark Birbeck
Managing Director
x-port.net Ltd.
220 Bon Marché Centre
241-251 Ferndale Road
London
SW9 8BJ
w: http://www.iedigital.net/
t: +44 (171) 501 9502
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 unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe 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