DAML Logo - Link to www.DAML.org

DAML HTML Gateway Tools

Home | About DAML | Announcements | Roadmap | Site Search

This page describes a set of tools and techniques for building DAML gateways (or "front ends") to existing HTML servers. Such gateways can be used until the site itself produces DAML directly.

Approach

A gateway generally has the following control structure:
  1. accept 1 or more identifiers as input parameters
  2. prepare an HTML GET or POST
  3. create an org.daml.html.Tree object, which
    1. retrieves the HTML page resulting from the GET or POST
    2. uses the java.text.html package included in Sun's Java Development Kit to parse the resulting page. java.text.html accommodate HTML which is not well-formed (neither HTML or XHTML).
    3. builds a standard XML Document Object Model for the page (as if it were well-formed).
  4. successively call org.daml.html.Tree.getString() with an XQuery queries to retrieve text within the document. getString current uses the Jaxen package to perform the queries.
  5. create a Jena model containing corresponding DAML statements
  6. return the serialized model to the user

Example

The table below shows several gateways that have been built using this approach:

gateway HTML site ontology implementation sample
NYSE stock symbols www.nyse.com nyse-ont nyse.java http://www.daml.org/cgi-bin/nyse?VZ
Sabre travel itineraries www.virtuallythere.com itinerary-ont virtuallythere.java private
ZIP Codes www.usps.com zipcode-ont zipcode.java http://www.daml.org/cgi-bin/zipcode?48192
airports www.ar-group.com airport-ont airport.java http://www.daml.org/cgi-bin/airport?GEG

Downloads

The following files are available for download:
Tree.java
implementation

Possible Future Directions

Author

Mike Dean
$Id: index.xml,v 1.8 2002/04/11 14:48:02 kmbarber Exp $