How to - include abstracts with iHOP functionality in your web site

Calls to the URLs below will retrieve XML wrapped HTML-fragments containing MEDLINE abstracts. Although these documents are complete and valid HTML document, it is recommended to parse the XML and to integrate selected HTML fragments into your web pages.

a) Query url with an iHOP document id (preferred query):
for XML: http:///UniPub/iHOP/ws/unipubid/{iHOP__DOC_ID}.xml

where {iHOP__DOC_ID} is to be replaced by the iHOP internal document identifier.

b) Query with a PMID:
for XML: http:///UniPub/iHOP/ws/pmid/{NCBI_PUBMED__PMID}.xml

where {NCBI_PUBMED__PMID} is to be replaced by the NCBI PMID identifier.

Result:

a) If the requested abstract is available in iHOP:
<iHOP>
  <iHOP_SCRIPT>Default implementation of the ihop(url) function.</iHOP_SCRIPT>
  ...
  <ABSTRACT>
  ...
   <iHOP_STYLE>iHOP CSS style guidelines (optional)</iHOP_STYLE>
   ...
   <iHOP_SCRIPT>iHOP default JavaScript for the functionality of the links in the abstract.</iHOP_SCRIPT>
   ...
   <ABSTRACT_TITLE>Abstract title (autonomous HTML fragment)</ABSTRACT_TITLE>
   ...
   <ABSTRACT_BODY>Abstract body (autonomous HTML fragment)</ABSTRACT_BODY>
   ...
  </ABSTRACT>
</iHOP>

HTML fragments wrapped in <ABSTRACT_TITLE> and <ABSTRACT_BODY> are autonomous, thus they do not depend on external CSS-styles or JavaScript functions.
However, to provide you control over the way links to iHOP work (e.g. popup windows, etc), a function "ihop(url)" is called upon user clicks on highlighted items (e.g. genes or proteins), if such a function is defined. The only parameter for the function is the URL pointing to a specific iHOP resource. The minimal implementation of this function is: "function ihop(url) { location.href=url; return false; } "
A default implementation comes with the result and is wrapped in the <iHOP_SCRIPT> tag.

Click here for a sample.

b) If the requested abstract is not available:
<iHOP>
  <STATUS>
   <CODE>204</CODE> <REASONING>No content</REASONING>
  </STATUS>
</iHOP>

Click here for a sample.