<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp   "&#160;">
]>

<xsl:stylesheet version="1.1" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:java="http://xml.apache.org/xalan/java"
   exclude-result-prefixes="java" 
   > 

<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>

<xsl:param name="docurl">/cgi-bin/fbidq.html?</xsl:param>
<xsl:param name="urlbase">lookup?url=</xsl:param>
<xsl:param name="pubmedurl">http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=PubMed&amp;dopt=Abstract&amp;tool=FlyBase&amp;list_uids=</xsl:param>

<xsl:template match="/">
	<html>
	<head>
	<title>Medline <xsl:value-of select="//MedlineID"/> </title>
	</head>
	<body id="body">
  <xsl:apply-templates/>
	</body>
	</html>
</xsl:template>

<xsl:template match="MedlineCitation">
	<h2 align="left"> 
  Medline Citation: <br/> <xsl:value-of select="Article/ArticleTitle"/>
  </h2>
  <xsl:apply-templates/>
  <br/>
</xsl:template>

<xsl:template  priority="9" match="FlyBaseID">
  <b><xsl:value-of select="name()"/></b> :
  <a href="{$docurl}{text()}"><xsl:apply-templates/></a> 
  <xsl:value-of select="'&nbsp;'"/>
</xsl:template>

<xsl:template  priority="9" match="PMID">
  <b><xsl:value-of select="name()"/></b> :
  <a href="{$pubmedurl}{text()}"><xsl:apply-templates/></a> 
  <xsl:value-of select="'&nbsp;'"/>
</xsl:template>

<xsl:template  priority="9" match="MedlineID">
  <b><xsl:value-of select="name()"/></b> :
  <xsl:apply-templates/> 
  <xsl:value-of select="'&nbsp;'"/>
</xsl:template>

<xsl:template  priority="9" match="Article">
  <b><xsl:value-of select="name()"/></b> <hr/>
  <xsl:apply-templates/> <hr/>
</xsl:template>

<xsl:template  priority="9" match="Abstract">
  <p> <b><xsl:value-of select="name()"/></b> :
  <xsl:apply-templates/> </p>
</xsl:template>

<!-- skip these -->
<xsl:template  priority="9" match="Author/ForeName|RegistryNumber|DateCreated|DateCompleted|DateRevised">
</xsl:template>

<xsl:template priority="8" match="MedlineCitation/*/*">
  <b><xsl:value-of select="name()"/></b> :
  <xsl:apply-templates/><br/>
</xsl:template>


<xsl:template  priority="9" match="MeshHeadingList|GeneSymbolList|ChemicalList">
  <p><b><xsl:value-of select="name()"/></b> : 
  <xsl:apply-templates/> </p>
</xsl:template>

<xsl:template  priority="9" match="MeshHeading|GeneSymbol|Chemical">
  <xsl:apply-templates/> ,
</xsl:template>

<xsl:template priority="2" match="MedlineCitation/*">
  <i><xsl:value-of select="name()"/></i> : 
  <xsl:apply-templates/><br/>
</xsl:template>


</xsl:stylesheet>
