Hello Peter,
Your problem is that you have a text block in your XML output that
should be transformed to XML elements ? And you need to scan each
separator for extracting the whole data ? Is it what you mean ?
XSLT was not really adapted to scan text values, but I think you could
try with a named template using a parameter.
Here a sample code :
<xsl:template name="parsing">
<xsl:param name="line"></xsl:param>
<xsl:if test="$line<>''">
<xsl:call-template name="parsing">
<xsl:with-param name="line">
<xsl:value-of select="substring-after( $line, 'YOUR_SEP' )"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
Best regards,
A.Brillant
EditiX - XML Editor and XSLT Debugger
http://www.editix.com
Peter Flynn wrote:
ti********@gmail.com wrote:
Forgive me if this has been asked before, but I haven't found anything
useful in my searches.
I have an XML document generated from an external program that I can't
change the output format on. Most of the output is great, but one
specific element, needs to be parsed into about a dozen smaller
elements based on a delimiter. I'm unsure how to do this effectively.
Any help would be much appreciated.
What language do you need to do this in?
In XSLT, have a look at substring-before and recursive templates.
///Peter