J
johkar
I need a hint (a big hint) on how to use XSL variables and parameters. It
is definitely not clicking yet. Below is my XML stripped down. There are
multiple Extension nodes and multiple FieldType nodes. Notice that the
fieldTypeCode nodes match in value. I need to pass in a fieldTypeCode
(fieldTypeCode='1') to a template which will iterate through the Extension
nodes and display the reportable Amount. I also need to do the same thing
to display the corresponding label which is the description node within
FieldType. I.E. GROSS INCOME PD 4808.76.
<?xml version="1.0" encoding="UTF-8"?>
<taxRecord>
<Extension>
<reportableText />
<reportableAmount>4808.76</reportableAmount>
<fieldTypeCode>1</fieldTypeCode>
</Extension>
<FieldType>
<description>GROSS INCOME PD</description>
<fieldTypeCode>1</fieldTypeCode>
</FieldType>
</taxRecord>
<xsl:variable name="field_type" select="fieldTypeCode"/>
<xsl:apply-templates select="taxRecord/Extension">
<xsl:with-param name="field_type" select="$field_type"/>
</xsl:apply-templates>
is definitely not clicking yet. Below is my XML stripped down. There are
multiple Extension nodes and multiple FieldType nodes. Notice that the
fieldTypeCode nodes match in value. I need to pass in a fieldTypeCode
(fieldTypeCode='1') to a template which will iterate through the Extension
nodes and display the reportable Amount. I also need to do the same thing
to display the corresponding label which is the description node within
FieldType. I.E. GROSS INCOME PD 4808.76.
<?xml version="1.0" encoding="UTF-8"?>
<taxRecord>
<Extension>
<reportableText />
<reportableAmount>4808.76</reportableAmount>
<fieldTypeCode>1</fieldTypeCode>
</Extension>
<FieldType>
<description>GROSS INCOME PD</description>
<fieldTypeCode>1</fieldTypeCode>
</FieldType>
</taxRecord>
<xsl:variable name="field_type" select="fieldTypeCode"/>
<xsl:apply-templates select="taxRecord/Extension">
<xsl:with-param name="field_type" select="$field_type"/>
</xsl:apply-templates>