--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+ <!--
+ Document : synreq_to_col.xsl
+ Author : c.mathew
+ Description: converts the Catalogue of Life response to the internal
+ synonym response.
+
+ -->
+
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
+
+ <xsl:param name="syncheckid"></xsl:param>
+
+ <xsl:template match="/">
+ <synonymResponse checklist="Catalogue Of Life">
+ <xsl:apply-templates select="results/result"/>
+ </synonymResponse>
+ </xsl:template>
+
+ <xsl:template match="result">
+ <xsl:choose>
+ <xsl:when test="name_status='accepted name'">
+ <acceptedName>
+ <taxonName>
+ <authorship><xsl:apply-templates select="author"/></authorship>
+ <name>
+ <nameComplete><xsl:apply-templates select="name"/></nameComplete>
+ <atomisedName>
+ <subGenus>
+ <genusPart><xsl:apply-templates select="genus"/></genusPart>
+ <specificEpithet><xsl:apply-templates select="species"/></specificEpithet>
+ <infraspecificEpithet><xsl:apply-templates select="infraspecies"/></infraspecificEpithet>
+ </subGenus>
+ </atomisedName>
+ <nameStatus><xsl:apply-templates select="name_status"/></nameStatus>
+ </name>
+ <rank><xsl:apply-templates select="rank"/></rank>
+ </taxonName>
+ <source>
+ <name><xsl:apply-templates select="source_database"/></name>
+ <url><xsl:apply-templates select="source_database_url"/></url>
+ </source>
+ <info>
+ <url><xsl:apply-templates select="url"/></url>
+ </info>
+ </acceptedName>
+ </xsl:when>
+ <xsl:otherwise>
+ <otherName>
+ <taxonName>
+ <authorship><xsl:apply-templates select="author"/></authorship>
+ <name>
+ <nameComplete><xsl:apply-templates select="name"/></nameComplete>
+ <atomisedName>
+ <subGenus>
+ <genusPart><xsl:apply-templates select="genus"/></genusPart>
+ <specificEpithet><xsl:apply-templates select="species"/></specificEpithet>
+ <infraspecificEpithet><xsl:apply-templates select="infraspecies"/></infraspecificEpithet>
+ </subGenus>
+ </atomisedName>
+ <nameStatus><xsl:apply-templates select="name_status"/></nameStatus>
+ </name>
+ <rank><xsl:apply-templates select="rank"/></rank>
+ </taxonName>
+ <source>
+ <name><xsl:apply-templates select="source_database"/></name>
+ <url><xsl:apply-templates select="source_database_url"/></url>
+ </source>
+ <info>
+ <url><xsl:apply-templates select="url"/></url>
+ </info>
+ </otherName>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="synonyms/synonym"/>
+ </xsl:template>
+
+ <xsl:template match="synonym">
+ <synonym>
+ <taxonName>
+ <authorship><xsl:apply-templates select="author"/></authorship>
+ <name>
+ <nameComplete><xsl:apply-templates select="name"/></nameComplete>
+ <atomisedName>
+ <subGenus>
+ <genusPart><xsl:apply-templates select="genus"/></genusPart>
+ <specificEpithet><xsl:apply-templates select="species"/></specificEpithet>
+ <infraspecificEpithet><xsl:apply-templates select="infraspecies"/></infraspecificEpithet>
+ </subGenus>
+ </atomisedName>
+ <nameStatus><xsl:apply-templates select="name_status"/></nameStatus>
+ </name>
+ <rank><xsl:apply-templates select="rank"/></rank>
+ </taxonName>
+ <source>
+ <name><xsl:apply-templates select="source_database"/></name>
+ <url><xsl:apply-templates select="source_database_url"/></url>
+ </source>
+ <info>
+ <url><xsl:apply-templates select="url"/></url>
+ </info>
+ </synonym>
+ </xsl:template>
+
+
+
+
+ </xsl:stylesheet>