How do I create an xsl method to grab a generic ‘list_object_1’ or ‘list_object_2’ and then use the number within the method. The data getting parsed is unable to be changed.
data to be parsed
<list_objects>
<list_object_1/>
<list_object_1>
<list_object_2/>
...
</list_object_1>
I thought it would be pretty simple to create a template where name matched the beginning of the element name ‘list_object_’. Is this possible? All the examples I saw for starts_with used an element name and then parsed the value, not just the element name.
expected template something like
<xsl:template match="starts-with(list_object_)>
<bb>
<xsl:apply-templates/>
</bb>
</xsl:template>
You almost had it. This is what you need: