Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
lex
/
Upload File :
New :
File
Dir
/home/cluster1/data/bu01/1121861/html/lex/search_form_original.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:variable name="language">ENGLISH</xsl:variable> <xsl:template match="SET"> <option> <xsl:attribute name="value"><xsl:value-of select="VALUE"/></xsl:attribute> <xsl:value-of select="ENGLISH"/> </option> </xsl:template> <xsl:template match="PHRASES_AND_FIELDS"> <xsl:param name="count"/> <xsl:variable name="name"><xsl:value-of select="concat('phrases_and_fields_',$count)"/></xsl:variable> <select> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:variable name="file"><xsl:value-of select="."/></xsl:variable> <xsl:apply-templates select="document($file)/PHRASES_AND_FIELDS/SET"/> </select> </xsl:template> <xsl:template match="REG_EXPS"> <xsl:param name="count"/> <xsl:variable name="name"><xsl:value-of select="concat('reg_exps_',$count)"/></xsl:variable> <select> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:variable name="file"><xsl:value-of select="."/></xsl:variable> <xsl:apply-templates select="document($file)/REG_EXPS/SET"/> </select> </xsl:template> <xsl:template match="CONNECTIVES"> <xsl:param name="count"/> <xsl:variable name="name"><xsl:value-of select="concat('connectives_',$count)"/></xsl:variable> <select> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> <xsl:variable name="file"><xsl:value-of select="."/></xsl:variable> <xsl:variable name="nodes" select="document($file)"/> <xsl:apply-templates select="$nodes/CONNECTIVES/SET"/> </select> </xsl:template> <xsl:template match="STRING"> <xsl:param name="count"/> <xsl:variable name="name"><xsl:value-of select="concat('string_',$count)"/></xsl:variable> <input type="text" size="20"> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> </input> </xsl:template> <xsl:template match="NEUTRALIZE"> <xsl:param name="count"/> <xsl:variable name="name"><xsl:value-of select="concat('neutralize_',$count)"/></xsl:variable> <input type="checkbox" value="on"> <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> </input> </xsl:template> <xsl:template match="QUERY"> <xsl:param name="count"/> <tr> <td> <xsl:apply-templates select="PHRASES_AND_FIELDS"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> </td> <td> <xsl:apply-templates select="REG_EXPS"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> </td> <td> <xsl:apply-templates select="STRING"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> </td> <td> <xsl:apply-templates select="NEUTRALIZE"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> </td> </tr> <xsl:if test="$count < (NUM_CONDITIONS - 1)"> <tr> <td colspan="4" align="center"> <xsl:apply-templates select="CONNECTIVES"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> </td> </tr> </xsl:if> </xsl:template> <xsl:template name="produce_search_form"> <xsl:param name="count"/> <xsl:variable name="num_conditions" select="//QUERY/NUM_CONDITIONS"/> <xsl:if test="$count < $num_conditions"> <xsl:apply-templates select="//QUERY"> <xsl:with-param name="count" select="$count"/> </xsl:apply-templates> <xsl:call-template name="produce_search_form"> <xsl:with-param name="count" select="$count + 1"/> <xsl:with-param name="num_conditions" select="$num_conditions"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="/"> <HTML> <HEAD> <TITLE>Nahuatl Lexicon Search Interface</TITLE> <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=iso-8859-1'></META> </HEAD> <BODY BGCOLOR='#FFFFFF' TEXT='#000000'> <img src="lexsearch_fulltemp.jpg"></img> <CENTER> <HR ALIGN='center' WIDTH='100%' SIZE='2' COLOR='#800000'/> <p></p> <FORM ACTION='../php/query_result.php4' METHOD='post'> <H4>Please pick template: <input type="checkbox" name="stylesheet" value="../lex/search_result.xsl"/> full<text> </text> <input type="checkbox" name="stylesheet" value="../lex/senses.xsl"/> senses only<text> </text> <input type="checkbox" name="stylesheet" value=""/> my dictionary </H4> <p></p> <INPUT TYPE='hidden' NAME='database' VALUE='ActiveNahuatl_2005'/> <INPUT TYPE='hidden' NAME='num_conditions'> <xsl:attribute name="value"><xsl:value-of select="//QUERY/NUM_CONDITIONS"/></xsl:attribute> </INPUT> <TABLE BORDER='1' WIDTH='600'> <TR> <TH>Field</TH> <TH>Logical operator</TH> <TH>String</TH> <TH>VLN</TH> </TR> <xsl:call-template name="produce_search_form"> <xsl:with-param name="count" select="0"/> </xsl:call-template> <TR> <TD COLSPAN='4' ALIGN='center'> <INPUT TYPE='submit' VALUE='Submit/Enviar'/> <INPUT TYPE='reset' VALUE='Reset/Volver a Cero'/> </TD> </TR> </TABLE> </FORM> <BR/> <BR/> </CENTER> </BODY> </HTML> </xsl:template> </xsl:stylesheet>