There's no iteration in XSLT, only functional mapping; therefore you can't "break" an iteration. (Think of xsl:for-each as effectively processing all the selected items in parallel).
Since you haven't given your real input data I can't give you a concrete answer. It looks to me as if you can select the items you need to process and then process them, ignoring the others: for example in psuedocode
if exists(itemData[. = 'text/plain html']
then process(itemData[. = 'text/plain html'][1]
else process(itemData[. = text/plain text']
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|