Again, going to wholly depend on the xmlpackage you are using. Let's say for example you are using the product.simpleproduct.xml.config xmlpackage. This package uses the aspdnsf_ProductInfo stored procedure to retrieve data to be used in the xmlpackage. This is contained in a query node in the xmlpackage with a name of Products and a rowElementName of Product
Code:
<query name="Products" rowElementName="Product" runif="showproduct">
<sql>
<![CDATA[
exec dbo.aspdnsf_ProductInfo @ProductID, @CustomerLevelID, 1, 0, @affiliateID
]]>
</sql>
Essentially, this means that any data returned by the stored procedure will be found in the root/products/product node of the xml that the xmlpackage transforms (you can see this xml for yourself by setting debug="true" in the top of the xmlpackage, and then browsing to the page where the xmlpackage is being used)
Code:
<package version="2.1" displayname="Simple Product" debug="true" includeentityhelper="true">
Further down in the xmlpackage, you'll see
Code:
<xsl:template match="Product">
which is used as a starting point (for lack of a better word) for where the cursor in xml currently exists. Since the query places the data in root/Products/Product, anything that occurs within the Product template essentially places you at the /root/Products/Product node and you can access the nodes there directly. For extension data, you could do
Code:
<xsl:value-of select="ExtensionData" disable-output-escaping="yes"/>
You could also get any other value returned in the Product node (again, to see this xml you can set debug="true" for the xmlpackage) just by referencing the name of the node
Code:
<xsl:value-of select="NodeName" disable-output-escaping="yes"/>
If the value you need is not returned in the XML (let's say you've added a custom field or need to reference a field from the database that isn't returned by the sql query at the top of the package), you can modify the sql that is being called to return the value you need and then reference it the same way...or you can create an entirely separate query...give it your own name (instead of Products/Product) and then reference it in it's own template or using full path syntax (if you're only returning a single value and don't need to traverse through multiple child nodes)
Code:
<xsl:value-of select="/root/CustomQueryName/CustomQueryRowElementName/ValueYouRetrieved" disable-output-escaping="yes"/>