<?xml version="1.0" ?>
<!DOCTYPE stylesheet 
[
<!ENTITY nbsp    "&amp;#160;">

]>

<!--==================================================================-->
<!--      Implements a search  engine on the "articledatabase"        -->
<!--      As a result, links to the html files in "articles"          -->
<!--      are displayed                                               -->
<!--        (c) Genias Benelux 2001                                   -->
<!--       This file is part of the VMP publishing system             -->
<!--      Its contents may  not be copied or used in any way          -->
<!--      outside of a licensed VMP system                            -->
<!--        July 16 2001                                              -->
<!--==================================================================-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		  version="1.0"
                  xmlns:vmp="http://www.hoise.com/vmp/1.0"
                  xmlns:xt="http://www.jclark.com/xt"
                  extension-element-prefixes="xt">

<xsl:include href="../set-up/current-date.xsl" />
<xsl:include href="../set-up/settings.xsl" />
<!--
<xsl:include href="../templates/format-basis.xsl"/>
-->
<xsl:include href="../templates/EnterTheGrid/format-basis-ETG.xsl"/>
<xsl:import href="../templates/EnterTheGrid/format-channel.xsl"/>

<xsl:variable name="resetForms" />



<xsl:variable name="id"/>
<xsl:variable name="title"/>
<xsl:variable name="subtitle_name"/>

<xsl:variable name="titleSmall"   select="translate($title,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="subtitle_nameSmall"   select="translate($subtitle_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="author_name"/>
<xsl:variable name="author_date"/>

<xsl:variable name="author_nameSmall"   select="translate($author_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="editor_name"/>
<xsl:variable name="editor_date"/>
<xsl:variable name="editor_comment"/>

<xsl:variable name="editor_nameSmall"   select="translate($editor_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="editor_commentSmall" select="translate($editor_comment,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="attach_name"/>
<xsl:variable name="attach_description"/>

<xsl:variable name="attach_nameSmall" select="translate($attach_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="attach_descriptionSmall" select="translate($attach_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />

<xsl:variable name="place_name"/>
<xsl:variable name="place_date"/>

<xsl:variable name="place_nameSmall" select="translate($place_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />

<xsl:variable name="part_name"/>
<xsl:variable name="part_section"/>
<xsl:variable name="part_subsection"/>
<xsl:variable name="part_issue"/>
<xsl:variable name="part_rank"/>
<xsl:variable name="part_status"/>

<xsl:variable name="part_nameSmall"       select="translate($part_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="part_sectionSmall"    select="translate($part_section,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="part_sectionSmall"    select="translate($part_subsection,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="part_subsectionSmall" select="translate($part_issue,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="part_issueSmall"      select="translate($part_rank,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="part_rankSmall"       select="translate($part_status,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />

<xsl:variable name="lead"/>
<xsl:variable name="leadshort"/>
<xsl:variable name="leadcon"/>

<xsl:variable name="leadSmall"      select="translate($lead,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="leadshortSmall" select="translate($leadshort,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="leadconSmall"   select="translate($leadcon,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="main"/>
<xsl:variable name="ref"/>

<xsl:variable name="mainSmall" select="translate($main,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="refSmall"  select="translate($ref,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="factsheet_item1"/>
<xsl:variable name="factsheet_item2"/>
<xsl:variable name="factsheet_item3"/>
<xsl:variable name="factsheet_item4"/>
<xsl:variable name="factsheet_item5"/>
<xsl:variable name="factsheet_item6"/>
<xsl:variable name="factsheet_item7"/>
<xsl:variable name="factsheet_item8"/>
<xsl:variable name="factsheet_item9"/>

<xsl:variable name="factsheet_item1Small" select="translate($factsheet_item1,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item2Small" select="translate($factsheet_item2,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item3Small" select="translate($factsheet_item3,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item4Small" select="translate($factsheet_item4,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item5Small" select="translate($factsheet_item5,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item6Small" select="translate($factsheet_item6,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item7Small" select="translate($factsheet_item7,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item8Small" select="translate($factsheet_item8,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
<xsl:variable name="factsheet_item9Small" select="translate($factsheet_item9,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />


<xsl:variable name="Action2" />
<xsl:variable name="CaseSensitive" select="'no'" />




<xsl:template match="vmp:article-database">
<xt:document href="temp/search-vmp-formatted.html">
<xsl:call-template name="basis">
<xsl:with-param name="Home" select="concat($BaseUrl,'articles/contentsenterthegrid.html')" />
<xsl:with-param name="CurrentPart" select="'EnterTheGrid'" />
<xsl:with-param name="CurrentIssue" select="'Search'" />
<xsl:with-param name="Sort" select="'Title'" />
<xsl:with-param name="Menu" >
<xsl:call-template name="menu">
<xsl:with-param name="CurrentIssue" select="'Search'" />
<xsl:with-param name="CurrentPart" select="'Search'" />
<xsl:with-param name="Sort" select="'Title'" />
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="Content">

<tr>
<td colspan="2">
<table width="100%" 
       border="0" 
       cellspacing="2" 
       cellpadding="0" 
       height="100%"
       align="center">

<tr> 

<td width="600"
    valign="top">

<!-- here we start  creation of the formatted  article files -->
<table align="left" valign="top" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" height="16" align="left" valign="top"><img src="{$IconDirectory}/spacer.gif" height="16" /></td>
</tr>
<tr>
<td width="16" align="left" valign="top"><img src="{$IconDirectory}/spacer.gif" width="16" /></td>
<td width="400" height="600" align="left" valign="top">

<!-- BodyText //-->
<table  align="left" valign="top" border="0" cellpadding="0" cellspacing="0">

<xsl:variable name="spart_name">
<xsl:choose>
<xsl:when test="$part_name = '-' " />
<xsl:otherwise>
<xsl:value-of select="$part_name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name="spart_section">
<xsl:choose>
<xsl:when test="$part_section = '-' "/>
<xsl:otherwise>
<xsl:value-of select="$part_section"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name="spart_subsection">
<xsl:choose>
<xsl:when test="$part_subsection = '-' "/>
<xsl:otherwise>
<xsl:value-of select="$part_subsection"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name="spart_status">
<xsl:choose>
<xsl:when test="$part_status = '-' "/>
<xsl:otherwise>
<xsl:value-of select="$part_status"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:choose>
<xsl:when test= "$CaseSensitive = 'yes'" >
<xsl:choose>
<xsl:when test="$Action2 = 'search_detail'">

<xsl:apply-templates select="vmp:article[ contains(@id,normalize-space($id))  

                                     and (contains(vmp:head/vmp:title,normalize-space($title)) 
                                                or  (string-length(normalize-space($title)) = 0))
                                                
                                     and (contains(vmp:head/vmp:subtitle/@name,normalize-space($subtitle_name)) 
                                                or normalize-space(vmp:head/vmp:subtitle/@name) = '')

                                     and (contains(vmp:head/vmp:author/@name,normalize-space($author_name))  
                                                or  (string-length(normalize-space($author_name)) = 0))
                                     and (contains(vmp:head/vmp:author/@date,normalize-space($author_date))  
                                                 or  (string-length(normalize-space($author_date)) = 0))
                                                
                                     and (contains(vmp:head/vmp:editor/@name,normalize-space($editor_name)) 
                                                 or  (string-length(normalize-space($editor_name)) = 0))
                                    and (contains(vmp:head/vmp:editor/@date,normalize-space($editor_date)) 
                                                 or  (string-length(normalize-space($editor_date)) = 0))
                                    and (contains(vmp:head/vmp:editor/@comment,normalize-space($editor_comment)) 
                                                 or  (string-length(normalize-space($editor_comment)) = 0))

                                    and (contains(vmp:head/vmp:attach/@name,normalize-space($attach_name)) 
                                                 or  (string-length(normalize-space($attach_name)) = 0))
                                    and (contains(vmp:head/vmp:attach/@description,normalize-space($attach_description)) 
                                                 or  (string-length(normalize-space($attach_description)) = 0))
 
                                    and (contains(vmp:head/vmp:part/@name,normalize-space($spart_name)) 
                                                 or  (string-length(normalize-space($spart_name)) = 0))
                                    and (contains(vmp:head/vmp:part/@section,normalize-space($spart_section)) 
                                                 or  (string-length(normalize-space($spart_section)) = 0))
                                    and (contains(vmp:head/vmp:part/@subsection,normalize-space($spart_subsection)) 
                                                or  (string-length(normalize-space($spart_subsection)) = 0))
                                    and (contains(vmp:head/vmp:part/@issue,normalize-space($part_issue)) 
                                                 or  (string-length(normalize-space($part_issue)) = 0))
                                    and (contains(vmp:head/vmp:part/@rank,normalize-space($part_rank)) 
                                                 or  (string-length(normalize-space($part_rank)) = 0))
                                    and (contains(vmp:head/vmp:part/@status,normalize-space($spart_status)) 
                                                 or  (string-length(normalize-space($spart_status)) = 0))



                                    and (contains(vmp:head/vmp:place/@name,normalize-space($place_name))  
                                                 or  (string-length(normalize-space($place_name)) = 0))
                                    and (contains(vmp:head/vmp:place/@date,normalize-space($place_date))  
                                                 or  (string-length(normalize-space($place_date)) = 0))

                                    and (contains(vmp:body/vmp:lead,normalize-space($lead))
                                    or  (string-length(normalize-space($lead)) = 0))
                                                
 
                                    and (contains(vmp:body/vmp:lead-short,normalize-space($leadshort))  
                                                 or  (string-length(normalize-space($leadshort)) = 0))
 
                                    and (contains(vmp:body/vmp:lead-con,normalize-space($leadcon))  
                                               or  (string-length(normalize-space($leadcon)) = 0)) 
 
                                    and (contains(vmp:body/vmp:main,normalize-space($main))  
                                                or  (string-length(normalize-space($main)) = 0)) 
 
                                    and (contains(vmp:body/vmp:ref,normalize-space($ref))  
                                                or  (string-length(normalize-space($ref)) = 0)) 
 
 
                                    and (contains(vmp:body/vmp:factsheet/@item1,normalize-space($factsheet_item1))  
                                                or  (string-length(normalize-space($factsheet_item1)) = 0)) 
                                    and (contains(vmp:body/vmp:factsheet/@item2,normalize-space($factsheet_item2))  
                                                or  (string-length(normalize-space($factsheet_item2)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item3,normalize-space($factsheet_item3))  
                                               or  (string-length(normalize-space($factsheet_item3)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item4,normalize-space($factsheet_item4))  
                                              or  (string-length(normalize-space($factsheet_item4)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item5,normalize-space($factsheet_item5))  
                                                or  (string-length(normalize-space($factsheet_item5)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item6,normalize-space($factsheet_item6))  
                                              or  (string-length(normalize-space($factsheet_item6)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item7,normalize-space($factsheet_item7))  
                                               or  (string-length(normalize-space($factsheet_item7)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item8,normalize-space($factsheet_item8))  
                                                or  (string-length(normalize-space($factsheet_item8)) = 0))
                                    and (contains(vmp:body/vmp:factsheet/@item9,normalize-space($factsheet_item9))  
                                               or  (string-length(normalize-space($factsheet_item9)) = 0))

                                                ]" />
 

</xsl:when>

<xsl:when test="$Action2 ='search_all_part'">
<tr><td colspan="2"  
    class="BodyKop"> You searched for <em><xsl:value-of select="normalize-space($main)" /></em></td></tr>

<xsl:apply-templates select="vmp:article[(vmp:head/vmp:part/@name = normalize-space($part_name))  and (contains(vmp:head/vmp:title,normalize-space($main)) 
                                      or contains(vmp:head/vmp:subtitle/@name,normalize-space($main)) 
                                      or contains(vmp:head/vmp:author/@name,normalize-space($main)) 
                                      or contains(vmp:head/vmp:attach/@name,normalize-space($main))  
                                      or contains(vmp:head/vmp:attach/@description,normalize-space($main))  
                                      or contains(vmp:head/vmp:place/@name,normalize-space($main)) 
                                      or contains(vmp:body/vmp:lead,normalize-space($main))  
                                      or contains(vmp:body/vmp:lead-short,normalize-space($main)) 
                                      or contains(vmp:body/vmp:lead-con,normalize-space($main)) 
                                      or contains(vmp:body/vmp:main,normalize-space($main)) 
                                      or contains(vmp:body/vmp:ref,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item1,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item2,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item3,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item4,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item5,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item6,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item7,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item8,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item9,normalize-space($main)) 
                                      )
                                     ]" />
 </xsl:when>
<xsl:otherwise>

<tr><td colspan="2"  
    class="BodyKop"> You searched for <em><xsl:value-of select="normalize-space($main)" /></em></td></tr>

<xsl:apply-templates select="vmp:article[ contains(vmp:head/vmp:title,normalize-space($main)) 
                                      or contains(vmp:head/vmp:subtitle/@name,normalize-space($main)) 
                                      or contains(vmp:head/vmp:author/@name,normalize-space($main)) 
                                      or contains(vmp:head/vmp:attach/@name,normalize-space($main))  
                                      or contains(vmp:head/vmp:attach/@description,normalize-space($main))  
                                      or contains(vmp:head/vmp:place/@name,normalize-space($main)) 
                                      or contains(vmp:body/vmp:lead,normalize-space($main))  
                                      or contains(vmp:body/vmp:lead-short,normalize-space($main)) 
                                      or contains(vmp:body/vmp:lead-con,normalize-space($main)) 
                                      or contains(vmp:body/vmp:main,normalize-space($main)) 
                                      or contains(vmp:body/vmp:ref,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item1,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item2,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item3,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item4,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item5,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item6,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item7,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item8,normalize-space($main)) 
                                      or contains(vmp:body/vmp:factsheet/@item9,normalize-space($main)) 
 
                                     ]" />
 
 
 
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>

<xsl:choose>
<xsl:when test="$Action2 = 'search_detail'">

<xsl:apply-templates select="vmp:article[ contains(@id,normalize-space($id))  

                                     and (contains(translate(vmp:head/vmp:title,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($titleSmall)) 
                                                or  (string-length(normalize-space($title)) = 0))
                                                
                                     and (contains(translate(vmp:head/vmp:subtitle/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($subtitle_nameSmall)) 
                                                or normalize-space(vmp:head/vmp:subtitle/@name) = '')

                                     and (contains(translate(vmp:head/vmp:author/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($author_nameSmall))  
                                                or  (string-length(normalize-space($author_name)) = 0))
                                     and (contains(vmp:head/vmp:author/@date,normalize-space($author_date))  
                                                 or  (string-length(normalize-space($author_date)) = 0))
                                                
                                     and (contains(translate(vmp:head/vmp:editor/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($editor_nameSmall)) 
                                                 or  (string-length(normalize-space($editor_name)) = 0))
                                    and (contains(vmp:head/vmp:editor/@date,normalize-space($editor_date)) 
                                                 or  (string-length(normalize-space($editor_date)) = 0))
                                    and (contains(translate(vmp:head/vmp:editor/@comment,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($editor_commentSmall)) 
                                                 or  (string-length(normalize-space($editor_comment)) = 0))

                                    and (contains(translate(vmp:head/vmp:attach/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($attach_nameSmall)) 
                                                 or  (string-length(normalize-space($attach_name)) = 0))
                                    and (contains(translate(vmp:head/vmp:attach/@description,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($attach_descriptionSmall)) 
                                                 or  (string-length(normalize-space($attach_description)) = 0))
 
                                    and (contains(translate(vmp:head/vmp:part/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($spart_nameSmall)) 
                                                 or  (string-length(normalize-space($spart_name)) = 0))
                                    and (contains(translate(vmp:head/vmp:part/@section,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($spart_sectionSmall)) 
                                                 or  (string-length(normalize-space($spart_section)) = 0))
                                    and (contains(translate(vmp:head/vmp:part/@subsection,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($spart_subsectionSmall)) 
                                                or  (string-length(normalize-space($spart_subsection)) = 0))
                                    and (contains(translate(vmp:head/vmp:part/@issue,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($part_issueSmall)) 
                                                 or  (string-length(normalize-space($part_issue)) = 0))
                                    and (contains(translate(vmp:head/vmp:part/@rank,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($part_rankSmall)) 
                                                 or  (string-length(normalize-space($part_rank)) = 0))
                                    and (contains(translate(vmp:head/vmp:part/@status,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($spart_statusSmall)) 
                                                 or  (string-length(normalize-space($spart_status)) = 0))



                                    and (contains(translate(vmp:head/vmp:place/@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($place_nameSmall))  
                                                 or  (string-length(normalize-space($place_name)) = 0))
                                    and (contains(vmp:head/vmp:place/@date,normalize-space($place_date))  
                                                 or  (string-length(normalize-space($place_date)) = 0))

                                    and (contains(translate(vmp:body/vmp:lead,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($leadSmall))
                                    or  (string-length(normalize-space($lead)) = 0))
                                                
 
                                    and (contains(translate(vmp:body/vmp:lead-short,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($leadshortSmall))  
                                                 or  (string-length(normalize-space($leadshort)) = 0))
 
                                    and (contains(translate(vmp:body/vmp:lead-con,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($leadconSmall))  
                                               or  (string-length(normalize-space($leadcon)) = 0)) 
 
                                    and (contains(translate(vmp:body/vmp:main,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                                or  (string-length(normalize-space($main)) = 0)) 
 
                                    and (contains(translate(vmp:body/vmp:ref,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($refSmall))  
                                                or  (string-length(normalize-space($ref)) = 0)) 
 
 
                                    and (contains(translate(vmp:body/vmp:factsheet/@item1,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item1Small))  
                                                or  (string-length(normalize-space($factsheet_item1)) = 0)) 
                                    and (contains(translate(vmp:body/vmp:factsheet/@item2,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item2Small))  
                                                or  (string-length(normalize-space($factsheet_item2)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item3,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item3Small))  
                                               or  (string-length(normalize-space($factsheet_item3)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item4,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item4Small))  
                                              or  (string-length(normalize-space($factsheet_item4)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item5,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item5Small))  
                                                or  (string-length(normalize-space($factsheet_item5)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item6,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item6Small))  
                                              or  (string-length(normalize-space($factsheet_item6)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item7,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item7Small))  
                                               or  (string-length(normalize-space($factsheet_item7)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item8,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item8Small))  
                                                or  (string-length(normalize-space($factsheet_item8)) = 0))
                                    and (contains(translate(vmp:body/vmp:factsheet/@item9,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($factsheet_item9Small))  
                                               or  (string-length(normalize-space($factsheet_item9)) = 0))

                                                ]" />
 

</xsl:when>
<xsl:when test="$Action2 = 'search_all_part'">

<tr><td colspan="2"  
    class="BodyKop"> You searched for <em><xsl:value-of select="normalize-space($main)" /></em></td></tr>

<xsl:apply-templates select="vmp:article[ (vmp:head/vmp:part/@name = normalize-space($part_name))  and (contains(translate(vmp:head/vmp:title,             'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:subtitle/@name,     'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:author/@name,       'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:attach/@name,       'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:head/vmp:attach/@description,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:head/vmp:place/@name,        'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:lead,               'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:body/vmp:lead-short,         'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:lead-con,           'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:main,               'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:ref,                'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item1,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item2,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item3,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item4,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item5,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item6,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item7,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item8,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item9,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      )
                                     ]" />
 
 
</xsl:when>
<xsl:otherwise>

<tr><td colspan="2"  
    class="BodyKop"> You searched for <em><xsl:value-of select="normalize-space($main)" /></em></td></tr>

<xsl:apply-templates select="vmp:article[ contains(translate(vmp:head/vmp:title,             'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:subtitle/@name,     'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:author/@name,       'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:head/vmp:attach/@name,       'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:head/vmp:attach/@description,'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:head/vmp:place/@name,        'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:lead,               'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall))  
                                      or contains(translate(vmp:body/vmp:lead-short,         'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:lead-con,           'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:main,               'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:ref,                'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item1,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item2,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item3,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item4,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item5,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item6,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item7,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item8,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
                                      or contains(translate(vmp:body/vmp:factsheet/@item9,   'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'),normalize-space($mainSmall)) 
 
                                     ]" />
 
 
 
</xsl:otherwise>
</xsl:choose>

</xsl:otherwise>
</xsl:choose>
<tr>
<td colspan="2" 
    align="left" 
    valign="top">
<img src="{$IconDirectory}/spacer.gif" 
     height="8" />
</td>
</tr>

<tr>
<td colspan="2"
    height="1" 
    align="left" 
    valign="top" 
    bgcolor="#99ccff">
<img src="{$IconDirectory}/spacer.gif" 
      height="1" />
</td>
</tr>

<tr>
<td colspan="2" 
    align="left" 
    valign="top"
    class="BodyTextBlue" >
 - End Search Result List -
</td>
</tr>

</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</xsl:with-param>
</xsl:call-template>
</xt:document>
</xsl:template>


<xsl:template match="vmp:article">
<xsl:choose>
<xsl:when test="vmp:head/vmp:part/@status = 'publish' or vmp:head/vmp:part/@status = 'online' ">

<!-- Blauwe scheidingslijn //-->
<tr>
<td colspan="2" 
    align="left" 
    valign="top">
<img src="{$IconDirectory}/spacer.gif" 
     height="8" />
</td>
</tr>

<tr>
<td colspan="2"
    height="1" 
    align="left" 
    valign="top" 
    bgcolor="#99ccff">
<img src="{$IconDirectory}/spacer.gif" 
      height="1" />
</td>
</tr>

<tr>
<td colspan="2" 
    align="left" 
    valign="top">
<img src="{$IconDirectory}/spacer.gif" 
     height="8" />
</td>
</tr>

<!-- Bullet en blauwe text //-->
<tr>
<td align="left" 
    valign="top" 
    class="BodyTextBlue">&#149;</td>
<td align="left" 
   valign="top" 
   class="BodyTextBlue">

	<a href="{$BaseUrl}articles/{vmp:head/vmp:part/@name}/{@id}.html">
 	<xsl:value-of select="vmp:head/vmp:title"/>
 	[<xsl:call-template name="format-date">
<xsl:with-param name="date"><xsl:value-of select="vmp:head/vmp:author/@date"/></xsl:with-param>
</xsl:call-template>
]
 	</a>
</td>

</tr>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>


</xsl:template>

<!-- ================================================================ -->
<!--                 This is for the menu on the left-hand side       -->
<!-- ================================================================ -->
<xsl:template name="menu" >
<xsl:param name="CurrentIssue" /> 
<xsl:param name="CurrentPart" /> 
<xsl:param name="Sort" /> 

<form action="{$SearchServlet}"
	 method="post" >
<input type="hidden"  
       name="Action" 
       value="search_all" />


<table align="left" 
      valign="top" 
      border="0" 
      cellpadding="0" 
      cellspacing="0">




<tr>
<td width="8" height="4" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="8" height="8" /></td>
<td align="left" valign="top" bgcolor="#99ccff" class="NavKop"><img src="{$IconDirectory}/spacer.gif" width="16" height="8" /></td>
<td width="16" height="4" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="16" height="8" /></td>
</tr>

<tr>
<td width="8" height="4" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="8" height="4" /></td>
<td height="4" align="left" valign="top" bgcolor="#99ccff" class="NavKop"><img src="{$IconDirectory}/spacer.gif" width="16" height="4" /></td>
<td width="16" height="4" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="16" height="4" /></td>
</tr>
<tr>
<td width="8" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="8" /></td>
<td align="left" valign="top" bgcolor="#99ccff" class="NavKop">
<input  type="text" name="main" 
       size="10" class="FormTextSearch" STYLE="width:126px;" /></td>
<td width="16" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="16" /></td>
</tr>
<tr>
<td width="8" height="2" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="8" height="2" /></td>
<td height="2" align="left" valign="top" bgcolor="#99ccff" class="NavKop"><img src="{$IconDirectory}/spacer.gif" height="2" /></td>
<td width="16" height="2" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="16" height="2" /></td>
</tr>
<tr>
<td width="8" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="8" /></td>
<td align="left" valign="top" bgcolor="#99ccff" class="NavKop"><input type="submit" value="Search" />
</td>
<td width="16" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="16" /></td>
</tr>


<tr>
<td colspan="2" width="144" height="16" align="left" valign="top" bgcolor="#99ccff"><img src="{$IconDirectory}/spacer.gif" width="144" height="16" /></td>
<td width="16" height="16" align="right" valign="top"><img src="{$IconDirectory}/curve_end_nav.gif" width="16" height="16" border="0" /></td>
</tr>
</table>
</form>
</xsl:template>

<xsl:template match="*|@*">
  <xsl:copy>
    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates select="node()"/>
  </xsl:copy>

</xsl:template>

<xsl:template name="format-date">
<xsl:param name="date"/>
<xsl:param name="format" select="'long'"/>
<xsl:param name="language"  select="'en'"/>

<xsl:value-of select="substring($date,7,2)"/>
<xsl:text> </xsl:text>
<xsl:value-of select="document('../set-up/date-format.xml')/date-format/months[@xml:lang = $language and @display = $format ]/month[number(substring($date,5,2))]"/>
<xsl:text> </xsl:text>
<xsl:value-of select="substring($date,1,4)"/>
</xsl:template>



</xsl:stylesheet>

