Changeset 275

Show
Ignore:
Timestamp:
02/16/07 14:16:48 (1 year ago)
Author:
nsteiner
Message:

extended stub:form template

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/config/xml/pages/txt/main_form.xml

    r268 r275  
    55    exclude-result-prefixes="stub ixsl"> 
    66  <part name="content"> 
    7     <stub:form
    8      
     7    <stub:form send-to-page="actiontarget" method="get" id="simpleform"
     8      <!-- Content follows soon --> 
    99    </stub:form> 
    1010  </part> 
  • trunk/config/xml/pages/txt/main_index.xml

    r267 r275  
    2323    <div><p><ixsl:value-of select="/document/Test/foo" /></p></div> 
    2424    <p>foo</p> 
     25    <stub:form send-to-page="actiontarget" method="get" id="simpleform"> 
     26      <!-- Content follows soon --> 
     27    </stub:form>     
    2528  </part> 
    2629</parts> 
  • trunk/src/main/resources/xsl/masterXInclude.xsl

    r264 r275  
    88  <xsl:import href="copy.xsl"/> 
    99  <xsl:import href="stub.xsl"/> 
     10  <xsl:namespace-alias stylesheet-prefix="ixsl" result-prefix="xsl" /> 
    1011   
    1112  <xsl:param name="__path"></xsl:param> 
  • trunk/src/main/resources/xsl/stub.xsl

    r268 r275  
    134134    </xi:include> 
    135135  </xsl:template> 
    136      
     136 
    137137  <xsl:template match="stub:image"> 
    138138    <xsl:variable name="dimensions" select="php:function('stubXSLCallback::invoke', 'image', 'getImageDimensions', @src)/child::*"/> 
     
    146146  <xsl:template match="stub:form"> 
    147147    <form> 
    148       <xsl:copy-of select="@*[local-name() != 'send-to-page']"/> 
    149       <xsl:variable name="method"> 
     148      <xsl:attribute name="action"> 
    150149        <xsl:choose> 
    151           <xsl:when test="@method"> 
     150          <xsl:when test="@send-to-page and not(@send-to-page = '')"> 
     151            <xsl:value-of select="@send-to-page"/> 
     152          </xsl:when> 
     153          <xsl:otherwise> 
     154            <xsl:value-of select="'home'"/> 
     155          </xsl:otherwise> 
     156        </xsl:choose> 
     157      </xsl:attribute>       
     158      <ixsl:attribute name="method"> 
     159        <xsl:choose> 
     160          <xsl:when test="@method and not(@method = '')"> 
    152161            <xsl:value-of select="@method"/> 
    153162          </xsl:when> 
     
    156165          </xsl:otherwise> 
    157166        </xsl:choose> 
    158       </xsl:variable> 
    159       <xsl:attribute name="method" select="$method"/> 
     167      </ixsl:attribute>       
     168      <xsl:copy-of select="@*[local-name() != 'send-to-page' and local-name() != 'method']"/> 
     169      <!-- 
    160170      <ixsl:if test="not($__sessid = '') and not($__sessname = '')"> 
    161171        <input type="hidden"> 
     
    164174        </input> 
    165175      </ixsl:if> 
     176      --> 
    166177    </form> 
    167178  </xsl:template> 
    168179 
    169   <xsl:template match="stub:langselect"
     180  <xsl:template match="stub:langselect" name="stub:langselect"
    170181    <xsl:variable name="langnodes" select="./stub:lang[@name = $lang]"/> 
    171182    <xsl:variable name="defaultnodes" select="./stub:lang[@name = 'default']"/>