# Re: A Note on URC Querying

Terry Allen (terry@ora.com)
Sun, 25 Jun 1995 13:22:09 -0700

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Larry Masinter: "Re: date in URN"
- Previous message: Terry Allen: "Re SGML URC spec comments"
- Maybe in reply to: Mark Madsen: "A Note on URC Querying"
- Next in thread: Mark Madsen: "Re: A Note on URC Querying"
- Reply: Mark Madsen: "Re: A Note on URC Querying"

    From: "Terry Allen" <terry@ora.com>

    Message-Id: <9506251322.ZM26248@dmg.west.ora.com>

    Date: Sun, 25 Jun 1995 13:22:09 -0700

    To: uri@bunyip.com

    Subject: Re: A Note on URC Querying

(The subject line provides context for the message-id
9506201041.ZM2373@idaknow.acl.lanl.gov ...)

Ron asks whether his own example, cited by Mark, is a good way
to go; it included METHODS and INTERFACE elements. And he
asks whether we could use processing instructions to convey
that info instead. Here's the example:

> <!doctype urc SYSTEM "urn:x-dns:uri.ansa.co.uk:method-dtd-7">
> <urc>
> <author method="m1">Smith, F.</author>
> <subject method="m2">Cats</subject>
> <URL></URL>
> <results>
> (Initially empty, this container holds the results of the
> searches.)
> </results>
> <methods>
> <m1 lang="niceScript">
> (A script written in the niceScript(TM) language that
> takes an argument which is the contents of the author
> field, splits on the comma, looks for an exact match
> of the last name and a first name beginning with what
> is left after the split. Returns NULL if there is no
> match, and a list of attribute:value pairs if there is.
> The attributes in this list lie in the intersection of
> those listed in the template and the Attribute-set of
> the candidate URC and the values are taken from the
> candidate URC.)
> </m1>
> <m2 lang="nastyScript">
> (A script that takes its argument from this template URC,
> compares it with the subject fields in the candidate URC,
> and returns TRUE if any of the subject lines contain the
> string "Cats", FALSE otherwise.)
> </m2>
> </methods>
> <interface>
> <main lang="pseudocode">
> bind input to name GLOB
> if (invoke(SELF.m2(GLOB))
> insert(SELF.results, SELF.m1(GLOB))
> </main>
> </interface>
> </urc>

This URC describes "all the works of {author} on cats currently
returned by the search procedure described." At least when you
run it the first time (what happens when you run it again and
the result differ? never mind, it's just an example). And
it supplies the value for {author}. The script itself could
be used for any author (the way the example is written; you
could generalize it for subject too), so really ought to be
an object in its own right, with its own URC, which you
can point to from this URC.

You could use SGML processing instructions here, but when you
parse the URC with SGML you're probably just going to be setting
up a table of values that match known semantics; then the script
going to be called by some other, resolving application. That
application needs to know what to do with

<methods scheme="urn:foo">

where "urn:foo" points to the script, but that info can be
contained in the definition of <methods>.

The method (defined by the owner of the name space)
for

Regards,

    --
    Terry Allen  (terry@ora.com)   O'Reilly & Associates, Inc.
    Editor, Digital Media Group    101 Morris St.
    			       Sebastopol, Calif., 95472

    A Davenport Group sponsor.  For information on the Davenport
      Group see ftp://ftp.ora.com/pub/davenport/README.html
    	or  http://www.ora.com/davenport/README.html

- Next message: Larry Masinter: "Re: date in URN"
- Previous message: Terry Allen: "Re SGML URC spec comments"
- Maybe in reply to: Mark Madsen: "A Note on URC Querying"
- Next in thread: Mark Madsen: "Re: A Note on URC Querying"
- Reply: Mark Madsen: "Re: A Note on URC Querying"