You'll want to add a query to your product xml package that selects the individual item shipping cost and pass in the productid as a parameter:
Code:
<query name="Shipping" rowElementName="Cost">
<sql>
<![CDATA[
select SomeValue as Cost, SomeValue as Method from SomeTable with (NOLOCK)
where ProductId=@ProductId
]]>
</sql>
<queryparam paramname="@ProductId"
paramtype="request"
requestparamname="ProductId"
sqlDataType="int"
defvalue="0"
validationpattern="" />
</query>
They will become available in the XML and you can then transform them in the XSLT.
You'll want to create a new template in your XSLT:
Code:
<xsl:template match="Cost">
<div class="shipCost">
<xsl:value-of select="Method"/> : <xsl:value-of select="Cost"/>
</div>
</xsl:template>
and then call it from wherever you want it to display in the package:
Code:
<xsl:apply-template select="/root/Shipping/Costs"/>