Im struggling a bit with the following. Given that items may contain several part and spec pairs, i want to process each pair, or apply the template to the item more than once.
Currently, each item is processed once and I'm missing the second part.

```
<figure>
    <list>
        <item>
            <part>
                <p>74174</p>
            </part>
            <spec>
                <u>a1</u>
            </spec>
            <part>
                <p>75375</p>
            </part>
            <spec>
                <u>a4</u>
            </spec>
        </item>
    </list>
</figure>

```

Stylesheet:

```
<xsl:if test="$a = 'abc'">
    <xsl:apply-templates mode="pt" select="/figure/list/item" />
</xsl:if>

<xsl:template mode="pt" match="item[./part]">
    <xsl:call-template name="ptt">
        <xsl:with-param name="p"><xsl:value-of select="part/p"/>
        </xsl:with-param>
        <xsl:with-param name="pr">
            <xsl:if test="spec/u">
                <xsl:element name="pr">
                    <xsl:element name="rpn">
                        <xsl:value-of select="spec/u"/>
                    </xsl:element>
                    <xsl:element name="rtn">Alt</xsl:element>
                </xsl:element>
            </xsl:if>
        </xsl:with-param>
    </xsl:call-template>
</xsl:template>

```

I simplified and cropped the code a bit since it goes on and on and on.. 

Edit: This next one is generating my new elements based solely on the input params

```
<xsl:template name="ptt">
    <xsl:param name="p"/>
    <xsl:param name=u"/>
</xsl:template>

```