Changeset 915

Show
Ignore:
Timestamp:
09/14/07 14:02:30 (11 months ago)
Author:
nsteiner
Message:

make stub:argument possible

Files:

Legend:

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

    r908 r915  
    2828 
    2929      <!-- test a link --> 
    30       <stub:link page="test">Test</stub:link> 
     30      <stub:link page="test"> 
     31                <stub:argument name="argument">wert</stub:argument> 
     32                <stub:argument name="argument2">noch_ein_wert</stub:argument> 
     33                Test 
     34            </stub:link> 
    3135      <!-- This is an include from a different file --> 
    3236      <stub:include part="disclaimer" href="include/parts.xml"/> 
  • trunk/src/main/resources/xsl/stub.xsl

    r858 r915  
    4545  </xsl:template> 
    4646 
     47  <xsl:template match="stub:argument"/> 
     48     
    4749  <xsl:template match="stub:link"> 
    4850    <a> 
     
    6264                <xsl:text>=</xsl:text> 
    6365                <ixsl:value-of select="$__sessid"/> 
     66                <xsl:for-each select="./stub:argument"> 
     67                    <xsl:choose> 
     68                        <xsl:when test="position() = 1"> 
     69                            <xsl:text>?</xsl:text> 
     70                        </xsl:when> 
     71                        <xsl:otherwise> 
     72                            <xsl:text>&amp;</xsl:text> 
     73                        </xsl:otherwise> 
     74                    </xsl:choose> 
     75                    <xsl:value-of select="@name"/> 
     76                    <xsl:text>=</xsl:text> 
     77                    <xsl:value-of select="."/> 
     78                </xsl:for-each> 
    6479      </ixsl:attribute> 
    65       <xsl:value-of select="."/> 
     80      <xsl:apply-templates/> 
    6681    </a> 
    6782  </xsl:template>