I know that in xslt not have the break statement and don’t know how to solve my problem.
Example
<tag name="param" />
<tag name="Token" />
<tag name="Token" />
<tag name="Token" />
<tag name="param" />
<tag name="Token" />
<tag name="param" />
<tag name="Token" />
<tag name="Token" />
<tag name="Token" />
<tag name="return"/>
Parameter must be grouped with all token before next param. How I can do it?
Output must be something like this:
param
Token
Token
Token
param
Token
param
Token
Token
Token
Another way to achieve this would be a key to match the “non-param” elements, grouping them by the first most preceding param-element
Then, you would start by matching your “param” elements
And for each one you match, you could then select the associated tags in group by using the key
Try the following XSLT
When applied to your sample XML (assuming a root lelement), the following is output
If you don’t want the “return” element you could add another template to match it and then ignore it.