3 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:uwobo="http://helm.cs.unibo.it/uwobo"
6 xmlns:subst="http://www.cs.unibo.it/helm/subst"
12 media-type="text/html" />
18 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
19 doctype-system="DTD/xhtml1-transitional.dtd" />
22 <xsl:param name="processorURL" select="''"/>
23 <xsl:param name="profile" select="''"/>
25 <xsl:variable name="params" select="document(concat($processorURL, 'getparams?id=', $profile))"/>
26 <xsl:variable name="profiles" select="document(concat($processorURL, 'listprofiles'))//li"/>
28 <xsl:template match="node()">
30 <xsl:copy-of select="@*"/>
31 <xsl:apply-templates />
35 <xsl:template match="uwobo:key">
36 <xsl:variable name="name" select="@name"/>
37 <xsl:value-of select="string($params/html/body/ul/li[string(key)=$name]/value)"/>
40 <xsl:template match="uwobo:profile">
41 <xsl:value-of select="$profile"/>
44 <xsl:template match="uwobo:profileOptionList">
45 <xsl:apply-templates select="$profiles" mode="make_form_option"/>
48 <xsl:template match="uwobo:profileCtrlOptionList">
50 var cicurls = new Array();
52 <select onChange="window.open(cicurls[selectedIndex],'_top')">
53 <xsl:apply-templates select="$profiles" mode="make_ctrl_form_option">
54 <xsl:with-param name="type" select="@type"/>
55 </xsl:apply-templates>
59 <xsl:template match="li" mode="make_form_option">
60 <xsl:variable name="tmp" select="string(.)" />
61 <option value="{$tmp}">
62 <xsl:if test="$tmp=$profile">
63 <xsl:attribute name="selected">1</xsl:attribute>
65 <xsl:value-of select="$tmp"/>
69 <xsl:template match="li" mode="make_ctrl_form_option">
70 <xsl:param name="type" select="''"/>
72 <xsl:text>cicurls[</xsl:text>
73 <xsl:value-of select="position()-1" />
74 <xsl:text>] = "</xsl:text>
76 <xsl:when test="$type = 'cic'">
77 <subst:makeHTMLURLwithProfile profile="{string(.)}"/>
80 <subst:makeTheoryURLwithProfile profile="{string(.)}"/>
83 <xsl:text>";</xsl:text>
86 <option value="{position()}">
87 <xsl:if test="string(.)=$profile">
88 <xsl:attribute name="selected">1</xsl:attribute>
90 <xsl:value-of select="string(.)"/>