Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...

AspDotNetStorefront
DotFeed

Pass two or more variables to a nested XML Package?

I have two variables that I need to pass as parameters to a nested XML package.
I managed how to pass ONE parameter but cannot pass both.
Here's my code:
 
<xsl:variable name="mystocknumber">
<xsl:value-of select="/root/AllPartInfo/AllPartInfoRow/stockticketnumber" disable-output-escaping="yes" />
</xsl:variable>
<xsl:variable name="productid">
<xsl:value-of select="/root/Products/Product/ProductID" disable-output-escaping="yes"/>
</xsl:variable>
 
<xsl:value-of select="aspdnsf:XmlPackage('custom.CheckPremiumPart.xml.config', concat('stock=', $mystocknumber))" disable-output-escaping="yes" />
 
Any idea?
asked Apr 1, 2016 in MultiStore by Yan Kleber (1,140 points)

1 Answer

0 votes
 
Best answer

You're only concat'ing one of the variables.  You need to add them both, with an ampersand for any past the first:

 

<xsl:value-of select="aspdnsf:XmlPackage('custom.CheckPremiumPart.xml.config', 
concat('stock=', $mystocknumber, '&#38;productid=', $productid))" 
disable-output-escaping="yes" />

(line breaks added so the forum doesn't run the line off the visible area)

answered Apr 1, 2016 by Vortx ScottS (13,500 points)
selected Apr 1, 2016 by Yan Kleber
Ohhhhh! It was so simple that I didn't thought on trying it! Dang!

Thank you very much, it clarified everything!

:)
...