Changeset 858

Show
Ignore:
Timestamp:
08/21/07 16:27:05 (11 months ago)
Author:
nsteiner
Message:

stub:link with session id

Files:

Legend:

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

    r837 r858  
    2525      <!-- This is an include in the same document --> 
    2626      <stub:include part="caching"/> 
    27  
     27            <stub:link page="test">Test</stub:link> 
    2828      <!-- This is an include from a different file --> 
    2929      <stub:include part="disclaimer" href="include/parts.xml"/> 
  • trunk/src/main/resources/xsl/master.xsl

    r838 r858  
    66    xmlns:stub="http://stubbles.net/stub" 
    77    exclude-result-prefixes="php xi ixsl stub"> 
     8         
    89  <xsl:import href="copy.xsl"/> 
    910  <xsl:import href="stub.xsl"/> 
     
    1112 
    1213  <xsl:param name="__path" select="@path"/> 
    13   <xsl:param name="__sessid" select="@sessid"/> 
    14   <xsl:param name="__sessname" select="@sessname"/> 
    15   <xsl:param name="page" select="@page"/> 
    1614  <xsl:param name="lang" select="@lang"/> 
    1715 
  • trunk/src/main/resources/xsl/stub.xsl

    r839 r858  
    1515        <xsl:copy-of select="@doctype-system" /> 
    1616      </ixsl:output> 
     17            <ixsl:variable name="page" select="/document/@page" /> 
     18            <ixsl:variable name="__sessid" select="/document/session/id" /> 
     19            <ixsl:variable name="__sessname" select="/document/session/name" /> 
    1720      <ixsl:template match="/"> 
    1821        <xsl:apply-templates select="node()"/> 
     
    4447  <xsl:template match="stub:link"> 
    4548    <a> 
    46       <xsl:attribute name="href"> 
     49      <ixsl:attribute name="href"> 
    4750        <xsl:choose> 
    4851          <xsl:when test="@processor"> 
     
    5356          </xsl:otherwise> 
    5457        </xsl:choose> 
     58                <xsl:text>/</xsl:text> 
    5559        <xsl:value-of select="@page"/> 
    56         <ixsl:if test="not($__sessid = '') and not($sessname = '')"> 
    57           <xsl:text>?</xsl:text> 
    58           <ixsl:value-of select="$__sessname"/> 
    59           <xsl:text>=</xsl:text> 
    60           <ixsl:value-of select="$__sessid"/> 
    61         </ixsl:if> 
    62       </xsl:attribute> 
     60                <xsl:text>;</xsl:text> 
     61                <ixsl:value-of select="$__sessname"/> 
     62                <xsl:text>=</xsl:text> 
     63                <ixsl:value-of select="$__sessid"/> 
     64      </ixsl:attribute> 
    6365      <xsl:value-of select="."/> 
    6466    </a>