Re: Suggestions for implementing a "document matches" program?

Dan Brickley wrote:
> 
> > Suppose that you want to create a PROGRAM which, when handed *any* 
> > XML instance document, decides whether or not it meets this desire:
> >
> > "I am interested in purchasing a camera with a 75-300mm zoom lens, 
> > that has an aperture of 4.5-5.6, and a shutter speed that ranges 
> > from 1/500 sec. to 1.0 sec."
> 
> Interesting question, but I'm going to be nitpicky.
> You describe two things,
>  i) some random XML instance document
>  ii) a personal interest in the purchasing of an object with certain
>      characteristics specified at various levels of detail.
> 
> Are you asking how we can find out whether the XML document, when read 
> as making assertions about the world, makes any assertions about an 
> object that fits that description?

Hi Dan.  Let me see if I can clarify my message with a couple of
examples.  If I hand this XML instance document to PROGRAM it should
output "Yes, it MATCHES"

<?xml version="1.0?>
<PhotographyStore rdf:ID="Hunts"
                               
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
    <store-location>Malden, MA</store-location>
    <phone>617-555-1234</phone>
    <catalog rdf:parseType="Collection">
        <SLR rdf:ID="Olympus-OM-10"
                   xmlns="http://www.camera.org#">
            <lens>
                 <Lens>
                       <focal-length>75-300mm zoom</focal-length>
                       <f-stop>4.5-5.6</f-stop>
                 </Lens>
            </lens>
            <body>
                 <Body>
                      <shutter-speed rdf:parseType="Resource">
                           <min>0.002</min>
                           <max>1.0</max>
                           <units>seconds</units>
                      </shutter-speed>
                 </Body>
            </body>
            <cost rdf:parseType="Resource">
                <rdf:value>325</rdf:value>
                <currency>USD</currency>
            </cost>
        </SLR>
    </catalog>
</PhotographyStore>

The PROGRAM should be able to realize (by consulting the Camera
Ontology) that

   SLR is a type of Camera
   f-stop is synonymous with aperture
   focal-length is synonymous with size

Further, the desired values for aperture and size are met by this XML
instance document.  Thus, this XML instance document is a match!

On the other hand, the PROGRAM should be able to recognize that this XML
instance document ...

<?xml version="1.0"?>
<Foo>
    <bar>...</bar>
</Foo>

... is not a match, since it is not talking about Cameras.

Does this make my message clearer?  /Roger

Received on Monday, 21 April 2003 08:41:55 UTC