Automating Search Interfaces

David Megginson ak117 at freenet.carleton.ca
Wed Feb 18 01:02:06 GMT 1998


Peter Murray-Rust writes:

 > Posted on behalf of John Petit

 > >One solution may be to use DTD attributes to cue the search engines.
 > >Perhaps a "LEVEL" attribute could cue the searchers to display
 > >interfaces to predefined levels. The example below shows that the
 > >"LEVEL" attribute means that the "numbeds" element should always appear
 > >in a search query, or at the top level or searches. Any elements that
 > >did not have this level 1 attribute would not be shown in the search
 > >interface. If the "LEVEL" attribute was not found in the DTD, the
 > >default would show all of the elements with search fields next to them.
 > >
 > ><!ELEMENT numbeds (#PCDATA)>
 > ><!ATTLIST numbeds
 > >    XML-SQLTYPE INTEGER #FIXED
 > >    SNAME CDATA #FIXED "Number of beds"
 > >    LEVEL CDATA #FIXED "1">

You could generalise this idea so that, instead of giving the level,
you gave the element type name in a different (real or hypothetical
DTD).  In other words,

  <!ELEMENT numbeds (#PCDATA)>
  <!ATTLIST numbeds
    general-doc NMTOKEN #FIXED "div1">

In other words, you're saying that the 'numbeds' element corresponds
to 'div1' (first-level division) in the other DTD.  This is more
useful, because you can express richer relationships than simply the
level.  For example, you could specify that 'expletive-deleted' is a
type of emphasised phrase and that 'city' is a type of name:

  <!ELEMENT expletive-deleted (#PCDATA)>
  <!ATTLIST expletive-deleted
    general-doc NMTOKEN #FIXED "emphasis">

  <!ELEMENT city (#PCDATA)>
  <!ATTLIST city
    general-doc NMTOKEN #FIXED "name">

That way, a user could search for any type of emphasised phrase or
proper noun, no matter what the element type was named. 


All the best,


David

-- 
David Megginson                 ak117 at freenet.carleton.ca
Microstar Software Ltd.         dmeggins at microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

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/
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