<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: param code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 27 Jul 2008 03:05:13 GMT</pubDate>
    <description>DZone Snippets: param code</description>
    <item>
      <title>Passing an XSL param from one template to another</title>
      <link>http://snippets.dzone.com/posts/show/5387</link>
      <description>&lt;code&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;&lt;br /&gt;&lt;xsl:stylesheet version="1.0"&lt;br /&gt;xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:variable name="xx"&gt;&lt;br /&gt;  &lt;html&gt;&lt;br /&gt;  &lt;body&gt;&lt;br /&gt;  &lt;xsl:call-template name="show_title"&gt;&lt;br /&gt;    &lt;xsl:with-param name="title" /&gt;&lt;br /&gt;  &lt;/xsl:call-template&gt;&lt;br /&gt;  &lt;/body&gt;&lt;br /&gt;  &lt;/html&gt;&lt;br /&gt;&lt;/xsl:variable&gt;&lt;br /&gt;&lt;br /&gt;&lt;xsl:template name="show_title" match="/"&gt;&lt;br /&gt;  &lt;xsl:param name="title" /&gt;&lt;br /&gt;  &lt;xsl:for-each select="catalog/cd"&gt;&lt;br /&gt;    &lt;p&gt;Title: &lt;xsl:value-of select="$title" /&gt;&lt;/p&gt;&lt;br /&gt;  &lt;/xsl:for-each&gt;&lt;br /&gt;&lt;/xsl:template&gt;&lt;br /&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;source: &lt;a href="http://www.w3schools.com/XSL/el_param.asp"&gt;XSLT &lt;xsl:param&gt; Element&lt;/a&gt; [w3schools.com]</description>
      <pubDate>Fri, 18 Apr 2008 15:00:27 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/5387</guid>
      <author>jrobertson (James Robertson)</author>
    </item>
    <item>
      <title>enforce lit-word! param</title>
      <link>http://snippets.dzone.com/posts/show/3158</link>
      <description>To enforce passing a lit-word! param, you need to make the param a get-word!, so it isn't evaluated when the func is called. This won't work if you're dynamically creating the param of course.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;incr: func [&lt;br /&gt;    {Increment a value by 1.}&lt;br /&gt;    :word [lit-word!]&lt;br /&gt;    /by {Change by this amount}     ; /skip ?&lt;br /&gt;        value&lt;br /&gt;][&lt;br /&gt;    set word add get word any [value 1]&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;&gt;&gt; a: 0&lt;br /&gt;;== 0&lt;br /&gt;;&gt;&gt; incr a&lt;br /&gt;;** Script Error: incr expected word argument of type: ;lit-word&lt;br /&gt;;** Near: incr a&lt;br /&gt;;&gt;&gt; incr 'a&lt;br /&gt;;== 1&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 16 Dec 2006 03:15:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3158</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
