Invoke apply template for variable value in xslt

In my xslt, I call the external code to assign the node to the xslt variable. Now I would like to apply a template to this node set.

<xsl:variable name="var1" select="ExtObject:GetNodeSet()"/> 

So far I have seen that templates can be used to enter an XML document. But can I parse the xml assigned to var1 using templates and reflecting the result in the output?

+4
source share
2 answers

Yes just use

 <xsl:variable name="$var1" select="ExtObject:GetNodeSet()"/> 

and

 <xsl:apply templates select="$var1"/> 

This works because the variable stores all the type information, so you can find the correct template.

+5
source

The answer is yes.

The response result is included only because StackOverflow does not like short answers.

0
source

Source: https://habr.com/ru/post/1490208/


All Articles