Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
jlex
/
test
/
Upload File :
New :
File
Dir
//home/cluster1/data/bu01/1121861/html/jlex/test/search_result.xsl
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:variable name="page_template"><xsl:value-of select="//resultset/template_type"/></xsl:variable> <xsl:variable name="template_type"> <xsl:choose> <xsl:when test="//resultset/template_type='mydictionary_view'">mydictionary_search_result</xsl:when> <xsl:otherwise> <xsl:value-of select="//resultset/template_type"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyzáéíóúāēīōć</xsl:variable> <xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZÁÉÍÓÚĀĒĪŌĆ</xsl:variable> <xsl:variable name="accents">áéíóúāēīōć</xsl:variable> <xsl:variable name="no_accents">aeiouaeiou</xsl:variable> <xsl:template match="link"> <b> Link: </b><a><xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></a> </xsl:template> <xsl:template match="nlao | nla | nlo | nbao | nba | nbo"> <xsl:variable name="val"><xsl:value-of select="."/></xsl:variable> <xsl:variable name="no_accents_val"><xsl:value-of select="translate($val,$accents,$no_accents)"/></xsl:variable> <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=lxam lxoa&reg_exp_0=equals&string_0=',$no_accents_val)"/> </xsl:attribute> <xsl:value-of select="."/> </a> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="nao | na | no | n | nr | nt | e | spn"> <xsl:text> </xsl:text> <i><xsl:value-of select="."/></i> <xsl:text> </xsl:text> </xsl:template> <!-- reusable replace-string function --> <xsl:template name="replace-string-red"> <xsl:param name="text"/> <xsl:param name="from"/> <xsl:param name="to"/> <xsl:choose> <xsl:when test="contains($text, $from)"> <xsl:variable name="before" select="substring-before($text, $from)"/> <xsl:variable name="after" select="substring-after($text, $from)"/> <xsl:variable name="prefix" select="concat($before, $to)"/> <xsl:value-of select="$before"/> <font color="red"><xsl:value-of select="$to"/></font> <xsl:call-template name="replace-string-red"> <xsl:with-param name="text" select="$after"/> <xsl:with-param name="from" select="$from"/> <xsl:with-param name="to" select="$to"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="replace_strings"> <xsl:param name="text" /> <xsl:param name="search">1</xsl:param> <xsl:variable name="num_iterations"> <xsl:choose> <xsl:when test="count(//resultset/search_string)<'4'"> <xsl:value-of select="count(//resultset/search_string)"/> </xsl:when> <xsl:otherwise>3</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="replaced_text"> <xsl:call-template name="replace-string-red"> <xsl:with-param name="text" select="$text"></xsl:with-param> <xsl:with-param name="from"><xsl:value-of select="//resultset/search_string[$search]"/></xsl:with-param> <xsl:with-param name="to" select="//resultset/search_string[$search]"></xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$search < $num_iterations"> <xsl:call-template name="replace_strings"> <xsl:with-param name="text" select="$replaced_text" /> <xsl:with-param name="search" select="$search + 1" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$replaced_text" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="sense_e"> <xsl:variable name="sense"><xsl:apply-templates/></xsl:variable> <xsl:variable name="num_search_strings"> <xsl:value-of select="count(//resultset/search_string)"/> </xsl:variable> <xsl:choose> <xsl:when test="$num_search_strings!='0'"> <xsl:variable name="foo"> <xsl:call-template name="replace_strings"> <xsl:with-param name="text" select="$sense"/> </xsl:call-template> </xsl:variable> <xsl:copy-of select="$foo"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$sense"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="sense_s"> <xsl:apply-templates/> </xsl:template> <xsl:template match="phrase_ngroup"> <b><i> — <xsl:apply-templates select="phrase_n"/> </i></b> (<xsl:apply-templates select="phrase_d"/>) <xsl:apply-templates select="snd_am"/> <xsl:apply-templates select="snd_oa"/> | <xsl:apply-templates select="phrase_e"/> </xsl:template> <xsl:template match="sense_egroup"> <xsl:variable name="dialect"><xsl:value-of select="sense_d"/></xsl:variable> <b><xsl:text> </xsl:text> <xsl:number value="position()"/>. <xsl:if test="$dialect!='Pending'"> (<xsl:value-of select="$dialect"/>) : </xsl:if> </b><xsl:apply-templates select="sense_e"/> <xsl:apply-templates select="phrase_ngroup"/> </xsl:template> <xsl:template match="snd_am"> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/phrases/am/mp3/',.,'.mp3')"/></xsl:attribute> <img src='../nahuatl/images/Iconmp3.jpg' height="8" width="22" BORDER="0"/></a><xsl:text> </xsl:text> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/phrases/am/wav/',.,'.wav')"/></xsl:attribute> <img src='../nahuatl/images/Iconwav.jpg' height="8" width="23" BORDER="0"/></a> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="snd_oa"> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/phrases/oa/mp3/',.,'.mp3')"/></xsl:attribute> <img src='../nahuatlimages/Iconmp3.jpg' height="8" width="22" BORDER="0"/></a> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/phrases/oa/wav/',.,'.wav')"/></xsl:attribute> <img src='../nahuatl/images/Iconwav.jpg' height="8" width="23" BORDER="0"/></a> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="lxam | lxoa"> <xsl:param name="dialect"/> <xsl:variable name="word"><xsl:apply-templates/></xsl:variable> <B><FONT COLOR="#800040"><xsl:value-of select="translate($word,$lcletters,$ucletters)"/></FONT></B> <xsl:text> </xsl:text><xsl:value-of select="$dialect"/> </xsl:template> <xsl:template match="lxam_alt | lxoa_alt"> <xsl:param name="dialect"/> <xsl:variable name="word"><xsl:apply-templates/></xsl:variable> <xsl:if test="position()='1'"> ; Alternate form(s):<xsl:text> </xsl:text> </xsl:if> <B><FONT COLOR="#800040"><i><xsl:value-of select="."/></i></FONT></B> <xsl:if test="position()!=last()">, </xsl:if> </xsl:template> <xsl:template match="lxoa_pr"> <xsl:param name="dialect"/> <xsl:variable name="word"><xsl:apply-templates/></xsl:variable> <xsl:if test="position()='1'"> ; Oapan practical orthography:<xsl:text> </xsl:text> </xsl:if> <B><FONT COLOR="#800040"><i><xsl:value-of select="."/></i></FONT></B> <xsl:if test="position()!=last()">, </xsl:if> </xsl:template> <xsl:template match="lxam_c"> <xsl:param name="ref"/> ; Citation form: <i><b><xsl:value-of select="."/></b></i><xsl:text> </xsl:text> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/tokens/am/mp3/',$ref,'_am.mp3')"/></xsl:attribute> <img src='../nahuatl/images/Iconmp3.jpg' height="8" width="22" BORDER="0"/></a> <xsl:text> </xsl:text> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/tokens/am/wav/',$ref,'_am.wav')"/></xsl:attribute> <img src='../nahuatl/images/Iconwav.jpg' height="8" width="23" BORDER="0"/></a>; </xsl:template> <xsl:template match="lxoa_c"> <xsl:param name="ref"/> <xsl:text> </xsl:text> ; Citation form: <i><b><xsl:value-of select="."/></b></i> <xsl:text> </xsl:text> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/tokens/oa/mp3/',$ref,'_oa.mp3')"/></xsl:attribute> <img src='../nahuatl/images/Iconmp3.jpg' height="8" width="22" BORDER="0"/></a> <xsl:text> </xsl:text> <a><xsl:attribute name="href"><xsl:value-of select="concat('http://nahuatl.ldc.upenn.edu/sounds/lex/tokens/oa/wav/',$ref,'_oa.wav')"/></xsl:attribute> <img src='../nahuatl/images/Iconwav.jpg' height="8" width="23" BORDER="0"/></a> </xsl:template> <xsl:template match="loan"> <xsl:param name="phrase"/> <xsl:value-of select="$phrase"/>: <xsl:apply-templates/> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="psm"> <xsl:param name="lxam"/> <xsl:param name="lxoa"/> <xsl:variable name="val"><xsl:apply-templates/></xsl:variable> Part of speech: <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=psm&reg_exp_0=equals&string_0=',$val)"/> </xsl:attribute> <xsl:value-of select="document('translations.xml')//psm/tag[@name=$val]"/> </a>; <xsl:if test="contains($val,'V1') or contains($val,'V2') or contains($val,'V3') or contains($val,'V4') "> <xsl:if test="$lxam != ''"> (Generate forms: Am | </xsl:if> <xsl:if test="$lxoa != ''"> <a> <xsl:attribute name="href">xfst_dir/conjugate2.php?form=intrans&words=<xsl:value-of select="$lxam"/>_<xsl:value-of select="$lxoa"/></xsl:attribute> <xsl:attribute name="target">parser</xsl:attribute> Oa </a>) </xsl:if> </xsl:if> </xsl:template> <xsl:template match="der"> <xsl:variable name="val"><xsl:apply-templates/></xsl:variable> Derivation of rightmost element <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=der&reg_exp_0=equals&string_0=',$val)"/> </xsl:attribute> <xsl:variable name="trans" select="document('translations.xml')//der/tag[@name=$val]"/> <xsl:choose> <xsl:when test="boolean($trans)"><xsl:value-of select="$trans"/></xsl:when> <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise> </xsl:choose> </a>; </xsl:template> <xsl:template match="compound | incorp | infv | infn | infa | irregv | rdp | trans | intense"> <xsl:param name="phrase"/> <xsl:variable name="field"><xsl:value-of select="name()"/></xsl:variable> <xsl:variable name="val"><xsl:apply-templates/></xsl:variable> <xsl:variable name="no_accents_val"><xsl:value-of select="translate($val,$accents,$no_accents)"/></xsl:variable> <xsl:value-of select="$phrase"/>: <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=',$field,'&reg_exp_0=equals&string_0=',$no_accents_val)"/> </xsl:attribute> <xsl:apply-templates/></a> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="irregv | trans | intense"> <xsl:param name="phrase"/> <xsl:value-of select="$phrase"/>: <xsl:text> </xsl:text> <xsl:apply-templates/> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="mrefgroup"> <xsl:variable name="type"><xsl:value-of select="mref_t"/></xsl:variable> <xsl:variable name="phrase"><xsl:value-of select="document('translations.xml')//mref_t/tag[@name=$type]"/></xsl:variable> <xsl:variable name="val"><xsl:value-of select="mref"/></xsl:variable> <xsl:variable name="no_accents_val"><xsl:value-of select="translate($val,$accents,$no_accents)"/></xsl:variable> <xsl:if test="position()='1'"> <xsl:value-of select="$phrase"/> (<xsl:value-of select="mref_d"/>) : </xsl:if> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=lxam lxam_alt lxoa lxoa_alt&reg_exp_0=equals&string_0=',$no_accents_val)"/> </xsl:attribute> <xsl:value-of select="$val"/> </a> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="xrefgroup"> <xsl:variable name="type"><xsl:value-of select="xref_t"/></xsl:variable> <xsl:variable name="phrase"><xsl:value-of select="document('translations.xml')//xref_t/tag[@name=$type]"/></xsl:variable> <xsl:variable name="val"><xsl:value-of select="xref"/></xsl:variable> <xsl:variable name="no_accents_val"><xsl:value-of select="translate($val,$accents,$no_accents)"/></xsl:variable> <xsl:value-of select="$phrase"/> (<xsl:value-of select="xref_d"/>) : <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=lxam lxam_alt lxoa lxoa_alt&reg_exp_0=equals&string_0=',$no_accents_val)"/> </xsl:attribute> <xsl:value-of select="$val"/> </a> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="root | sem"> <xsl:param name="phrase"/> <xsl:variable name="field"><xsl:value-of select="name()"/></xsl:variable> <xsl:variable name="val"><xsl:apply-templates/></xsl:variable> <xsl:variable name="no_accents_val"><xsl:value-of select="translate($val,$accents,$no_accents)"/></xsl:variable> <xsl:variable name="fields"><xsl:value-of select="$field"/><xsl:text> </xsl:text><xsl:value-of select="$field"/>_s</xsl:variable> <xsl:if test="position()=1"> <b><font color="#800040"><xsl:value-of select="$phrase"/></font></b> </xsl:if> <xsl:text> </xsl:text> <a> <xsl:attribute name="href"> <xsl:value-of select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$template_type,'&db_cols_0=',$fields,'&reg_exp_0=equals&string_0=',$no_accents_val)"/> </xsl:attribute> <xsl:apply-templates/> </a> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="nse | nae | nde"> <xsl:param name="phrase"/> <b><font color="#800040"><xsl:value-of select="$phrase"/>: </font></b> <xsl:apply-templates/> <xsl:if test="not(position()=last())">, </xsl:if> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="ilus"> <b>Illustration: </b> <a><xsl:attribute name="href"><xsl:apply-templates/></xsl:attribute> <img src='../../nahuatl/images/Iconpencil.jpg' height="25" width="25" BORDER="0"/> </a> <xsl:if test="position()=last()">; </xsl:if> </xsl:template> <xsl:template match="ency_ref"> <b><font color="#800040">Cultural encyclopedia: </font></b> <a><xsl:attribute name="href">http://nahuatl.ldc.upenn.edu/ency/<xsl:value-of select="."/></xsl:attribute> <img src='../nahuatl/images/Iconency.jpg' height="8" width="25" BORDER="0"/> </a> </xsl:template> <xsl:template match="refgroup"> <xsl:variable name="ref"><xsl:value-of select="ref"/></xsl:variable> <xsl:variable name="lxam"><xsl:value-of select="lxam"/></xsl:variable> <xsl:variable name="lxoa"><xsl:value-of select="lxoa"/></xsl:variable> <tr> <td colspan="3"> <xsl:if test="$page_template='mydictionary_search_result'"> <input type="checkbox" name="refs[]"> <xsl:attribute name="value"><xsl:value-of select="ref"/></xsl:attribute> </input> </xsl:if> <xsl:if test="$page_template='mydictionary_view'"> <input type="checkbox" name="refs[]"> <xsl:attribute name="value"><xsl:value-of select="ref"/></xsl:attribute> </input> </xsl:if> <xsl:apply-templates select="lxam"><xsl:with-param name="dialect" select="'(Am)'"/></xsl:apply-templates> <xsl:apply-templates select="lxam_alt"><xsl:with-param name="dialect" select="'Am'"/></xsl:apply-templates> <xsl:apply-templates select="lxam_c"><xsl:with-param name="ref" select="$ref"/></xsl:apply-templates> <xsl:apply-templates select="lxoa"><xsl:with-param name="dialect" select="'(Oa)'"/></xsl:apply-templates> <xsl:apply-templates select="lxoa_alt"><xsl:with-param name="dialect" select="'Oa'"/></xsl:apply-templates> <xsl:apply-templates select="lxoa_pr"><xsl:with-param name="dialect" select="'Oa'"/></xsl:apply-templates> <xsl:apply-templates select="lxoa_c"><xsl:with-param name="ref" select="$ref"/></xsl:apply-templates> </td> </tr> <tr> <td> <xsl:text> </xsl:text> </td> <td width="13"> <xsl:text> </xsl:text> </td> <td> <xsl:apply-templates select="loan"><xsl:with-param name="phrase" select="'Loan'"/></xsl:apply-templates> <xsl:apply-templates select="psm"><xsl:with-param name="lxam" select="$lxam"/><xsl:with-param name="lxoa" select ="$lxoa"/></xsl:apply-templates> <xsl:apply-templates select="compound"><xsl:with-param name="phrase" select="'Compounding'"/></xsl:apply-templates> <xsl:apply-templates select="incorp"><xsl:with-param name="phrase" select="'Incorporation'"/></xsl:apply-templates> <xsl:apply-templates select="der"/> <xsl:apply-templates select="infv"><xsl:with-param name="phrase" select="'Verb inflection'"/></xsl:apply-templates> <xsl:apply-templates select="infn"><xsl:with-param name="phrase" select="'Noun inflection'"/></xsl:apply-templates> <xsl:apply-templates select="infa"><xsl:with-param name="phrase" select="'Adjectival inflection'"/></xsl:apply-templates> <xsl:apply-templates select="irregv"><xsl:with-param name="phrase" select="'Verbal irregularity'"/></xsl:apply-templates> <xsl:apply-templates select="rdp"><xsl:with-param name="phrase" select="'Reduplication pattern'"/></xsl:apply-templates> <xsl:apply-templates select="trans"><xsl:with-param name="phrase" select="'Transitivity alternation'"/></xsl:apply-templates> <xsl:apply-templates select="intense"><xsl:with-param name="phrase" select="'Intensifier use'"/></xsl:apply-templates> </td> </tr> <tr> <td> <xsl:text> </xsl:text> </td> <td width="5"> <xsl:text> </xsl:text> </td> <td> <xsl:apply-templates select="sense_egroup"/> </td> </tr> <tr> <td> <xsl:text> </xsl:text> </td> <td width="5"> <xsl:text> </xsl:text> </td> <td> <xsl:if test="count(xrefgroup | mrefgroup) != 0"> <b><font color="#800040"> Derivational and semantic cross-references: </font></b> </xsl:if> <xsl:apply-templates select="xrefgroup[xref_t='plus_tla' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='plus_tla' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='stative' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='stative' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='frequent' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='frequent' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='ni_base' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='ni_base' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce0' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce0' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce1' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce1' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce2' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_reduce2' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_caus' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_caus' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_applic' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_applic' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_applic.caus' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='val_add_applic.caus' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='minus_tla' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='minus_tla' and xref_d='Oa']"/> <xsl:apply-templates select="xrefgroup[xref_t='verb_base' and xref_d='Am']"/> <xsl:apply-templates select="xrefgroup[xref_t='verb_base' and xref_d='Oa']"/> <xsl:apply-templates select="mrefgroup[mref_t='natural' and mref_d='Am']"/> <xsl:apply-templates select="mrefgroup[mref_t='equivalent' and mref_d='Oa']"/> <xsl:apply-templates select="mrefgroup[mref_t='synonym' and mref_d='Am']"/> <xsl:apply-templates select="mrefgroup[mref_t='synonym' and mref_d='Oa']"/> <xsl:apply-templates select="mrefgroup[mref_t='confer' and mref_d='Am']"/> <xsl:apply-templates select="mrefgroup[mref_t='confer' and mref_d='Oa']"/> <xsl:apply-templates select="root"><xsl:with-param name="phrase" select="'Root(s)'"/></xsl:apply-templates> </td> </tr> <tr> <td> <xsl:text> </xsl:text> </td> <td width="5"> <xsl:text> </xsl:text> </td> <td> <xsl:apply-templates select="nae"><xsl:with-param name="phrase" select="'Phonology and morphology'"/></xsl:apply-templates> <xsl:apply-templates select="nse"><xsl:with-param name="phrase" select="'Semantics'"/></xsl:apply-templates> <xsl:apply-templates select="nde"><xsl:with-param name="phrase" select="'Comparative dialectology'"/></xsl:apply-templates> <xsl:apply-templates select="ency_ref"><xsl:with-param name="phrase" select="'Cultural encyclopedia'"/></xsl:apply-templates> </td> </tr> <tr> <td> <xsl:text> </xsl:text><br/> </td> <td width="5"> <xsl:text> </xsl:text> </td> </tr> </xsl:template> <xsl:template name="make_page_bar"> <xsl:param name="page"/> <xsl:if test="$page*50 < //@num_results + 50"> <td> <a> <xsl:variable name="link" select="concat('../php4/query_result.php4?project=nahuatl&template_type=',$page_template,'&page=',$page)"/> <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute> <xsl:value-of select="$page"/> </a> </td> <xsl:call-template name="make_page_bar"> <xsl:with-param name="page" select="$page+1"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="/"> <html> <head> <title>The Nahuatl to English Dictionary of Ameyaltepec and San Agustín Oapan Nahuatl</title> <script language="javascript" type="text/javascript"> var checkflag = "false"; function check(field_name) { var field = document.forms[0].elements[field_name]; if(checkflag == "false") { for(i=0;i<field.length;i++) { field[i].checked = true; } checkflag="true"; } else { for(i=0;i<field.length;i++) { field[i].checked = false; } checkflag="false"; } } function share() { document.forms["search_results"].elements["function"].value = "share_refs"; document.forms["search_results"].submit(); } </script> </head> <body bgcolor="white" onLoad="window.focus()"> <font face="helvetica" size="2"> <img src="../nahuatl/images/lexsearch_fulltemp.jpg" width="779" height="116" usemap="#Map" border="0"/> <map name="Map"> <area shape="rect" coords="1,2,57,29" href="../index.html" target="_top"/> <area shape="rect" coords="150,2,200,29" href="../tutorial/tutorial.htm" target="_top"/> <area shape="rect" coords="576,2,636,28" href="../nahuatl/lexhome.htm" target="_top"/> <area shape="rect" coords="638,2,694,30" href="../gram/gramhome.htm" target="_top"/> <area shape="rect" coords="695,2,781,29" href="../ency/encyhome.htm" target="_top"/> </map> <hr align="left" width="780" size="2" color="#800000"/> <xsl:if test="contains($template_type,'mydictionary')"> <b><xsl:value-of select="//resultset/username"/> logged in.</b><br/> </xsl:if> <br/> <xsl:variable name="num_results" select="//resultset/@num_results"/> <b>The query returned <xsl:value-of select="$num_results"/> hits. </b><br/> <xsl:variable name="page" select="//resultset/@page"/> <xsl:variable name="first" select="$page*50-49"/> <xsl:variable name="last" select="$first + 49"/> <xsl:if test="$page!='0'"> <b>Displaying Hits: </b> <xsl:value-of select="$first"/><xsl:text> - </xsl:text> <xsl:choose> <xsl:when test="$num_results < $last"><xsl:value-of select="$num_results"/></xsl:when> <xsl:otherwise><xsl:value-of select="$last"/></xsl:otherwise> </xsl:choose> </xsl:if> <br/> <table align="left"> <tr> <td nowrap="1"><b>Total pages:</b></td> <xsl:call-template name="make_page_bar"> <xsl:with-param name="page" select="1"/> </xsl:call-template> </tr> </table> <br/> <br/> <form name="search_results" action="../php4/mydictionary.php4" method="post"> <xsl:if test="$page_template='mydictionary_search_result'"> <input type="hidden" name="function" value="add_refs"/> </xsl:if> <xsl:if test="$page_template='mydictionary_view'"> <input type="hidden" name="function" value="delete_refs"/> </xsl:if> <table cellspacing='0' cellpadding='0' width='800' > <xsl:apply-templates select="//refgroup"/> </table> <hr align="left" width="780" size="2" color="#800000"/> <center> <table> <tr> <xsl:call-template name="make_page_bar"> <xsl:with-param name="page" select="1"/> </xsl:call-template> </tr> </table> </center> <xsl:if test="$page_template='mydictionary_search_result'"> <input type="button" onClick="check('refs[]')" value="Select All"/><BR/> <input type="submit" value="Add to My Dictionary"/> <BR/> <a href="../php4/mydictionary.php4?function=view_refset">View My Dictionary</a> <BR/> <a href="../php4/login.php4?function=logout">Log out of My Dictionary</a> <br/><br/> <input type="button" value="Share With Users" onclick="share()"/> </xsl:if> <xsl:if test="$page_template='mydictionary_view'"> <input type="button" onClick="check('refs[]')" value="Select All"/><BR/> <input type="submit" value="Delete from My Dictionary"/> <br/><br/> <input type="button" value="Share With Users" onclick="share()"/> <br/> <a href="../php4/login.php4?function=logout">Log out of My Dictionary</a> <br/><br/> </xsl:if> </form> <br/><br/> <xsl:apply-templates select="//resultset/link"/> <center> <table width="780" border="0"> <tr> <td> <div align="center"> <xsl:choose> <xsl:when test="contains($template_type,'mydictionary')"> <p><a href="../nahuatl/mydictionary_search.html"><img src="../nahuatl/images/Back2.gif" width="60" height="60" border="0"/></a></p> </xsl:when> <xsl:otherwise> <p><a href="../nahuatl/nahuatl_search.html"><img src="../nahuatl/images/Back2.gif" width="60" height="60" border="0"/></a></p> </xsl:otherwise> </xsl:choose> <center> <b><font size="3" color="#D46702">Click to return to search page!</font></b> </center> </div> </td> </tr> </table> </center> </font> </body> </html> </xsl:template> </xsl:stylesheet>