I'm trying to assign a dynamic generated XML to a xsl variable and from there I want to loop over it. But I never get any info or result from the loop. So I tried to add the XML manually in the xslt file like this to show you what I'm expecting or trying to work with:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl">
<xsl:output method="text" encoding="utf-8" />
<xsl:variable name="websites">
<SHOP><WEBSITE><STORE_VIEW_CODE>ca_en</STORE_VIEW_CODE><LANGUAGE>en</LANGUAGE></WEBSITE><WEBSITE><STORE_VIEW_CODE>nl_nl</STORE_VIEW_CODE><LANGUAGE>nl</LANGUAGE></WEBSITE></SHOP>
</xsl:variable>
<xsl:template match="/">
<xsl:for-each select="$websites">
<xsl:apply-templates select="WEBSITE"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="WEBSITE">
<xsl:text>FOUND SOMETHING</xsl:text>
</xsl:template>
But there is nothing coming back from that loop. I can use value-of and select the website variable then I see the whole content but I would like to loop through the nodes to extract the text.
UPDATE The two answers with node-set and the link for more details solved my problem.