Changeset 197
- Timestamp:
- 02/02/07 08:51:58 (1 year ago)
- Files:
-
- trunk/experiments/general/xsl/stub.xsl (modified) (2 diffs)
- trunk/experiments/general/xsl/test.xml (modified) (1 diff)
- trunk/experiments/general/xsl/test.xsl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/experiments/general/xsl/stub.xsl
r190 r197 9 9 <a> 10 10 <xsl:attribute name="href"> 11 <xsl: text>/link/to/project/</xsl:text>11 <xsl:value-of select="$__path"/> 12 12 <xsl:value-of select="@page"/> 13 <xsl:value-of select="$__sessionid"/> 13 14 </xsl:attribute> 14 15 <xsl:value-of select="."/> … … 16 17 </xsl:template> 17 18 18 <xsl:template match="stub:include"> 19 <xsl:template match="stub:maincontent"> 20 <xsl:variable name="path"> 21 <xsl:choose> 22 <xsl:when test="@path"> 23 <xsl:value-of select="@path"/> 24 </xsl:when> 25 <xsl:otherwise> 26 <xsl:text></xsl:text> 27 </xsl:otherwise> 28 </xsl:choose> 29 </xsl:variable> 30 <xsl:variable name="prefix"> 31 <xsl:choose> 32 <xsl:when test="@prefix"> 33 <xsl:value-of select="@prefix"/> 34 </xsl:when> 35 <xsl:otherwise> 36 <xsl:text>main_</xsl:text> 37 </xsl:otherwise> 38 </xsl:choose> 39 </xsl:variable> 40 <xsl:variable name="suffix"> 41 <xsl:choose> 42 <xsl:when test="@suffix"> 43 <xsl:value-of select="@suffix"/> 44 </xsl:when> 45 <xsl:otherwise> 46 <xsl:text>.xml</xsl:text> 47 </xsl:otherwise> 48 </xsl:choose> 49 </xsl:variable> 50 <xsl:variable name="part"> 51 <xsl:choose> 52 <xsl:when test="@part"> 53 <xsl:value-of select="@part"/> 54 </xsl:when> 55 <xsl:otherwise> 56 <xsl:text>content</xsl:text> 57 </xsl:otherwise> 58 </xsl:choose> 59 </xsl:variable> 60 <xsl:call-template name="stub:include"> 61 <xsl:with-param name="href"> 62 <xsl:value-of select="$path"/> 63 <xsl:value-of select="$prefix"/> 64 <xsl:value-of select="$page"/> 65 <xsl:value-of select="$suffix"/> 66 </xsl:with-param> 67 <xsl:with-param name="part" select="$part"/> 68 </xsl:call-template> 69 </xsl:template> 70 71 <xsl:template match="stub:include" name="stub:include"> 19 72 <xsl:param name="href" select="@href"/> 20 73 <xsl:param name="part" select="@part"/> trunk/experiments/general/xsl/test.xml
r185 r197 3 3 <html> 4 4 <body> 5 <stub:link page="testlinkPage">Das ist ein Stubbles-Link</stub:link> 6 <stub:include href="parts.xml" part="frank"/> 7 <stub:image src="stubbles.png" alt="Stubbles Logo"/> 5 <stub:maincontent part="content" path=""/> 8 6 </body> 9 7 </html> trunk/experiments/general/xsl/test.xsl
r184 r197 5 5 xmlns:stub="http://stubbles.org/stub" 6 6 exclude-result-prefixes="php xi stub"> 7 7 8 8 <xsl:import href="copy.xsl"/> 9 9 <xsl:import href="stub.xsl"/> 10 10 11 <xsl:param name="__path"></xsl:param> 12 <xsl:param name="__sessionid"></xsl:param> 13 <xsl:param name="page">home</xsl:param> 14 11 15 <xsl:param name="owner" select="'Frank Kleine'"/> 12 16 <xsl:output method="html" encoding="iso-8859-1" indent="no"/> … … 16 20 </xsl:template> 17 21 18 <!--19 <xsl:template match="collection">20 <xsl:copy-of select="php:function('stubXSLCallback::invoke', 'say', 'hello', 'Nico Steiner')"/> Welcome to <xsl:value-of select="$owner"/>'s sweet CD collection!21 <xsl:apply-templates/>22 </xsl:template>23 24 <xsl:template match="cd">25 <h1><xsl:value-of select="title"/></h1>26 <h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2>27 <hr />28 </xsl:template>29 -->30 31 22 </xsl:stylesheet>
