I'm using Saxon9HE to transform some XML 2.0. from a Java class; the solution is from this earlier question
I'm transforming double pipe delimited text into XML.
However, some of the fields contain people's resumes and the transform throws the looping error mentioned in the title.
Is there a way fix this? I read about increasing the maximum depth in templates stack but that only applies to Oxygen; is there a similar setting in the Saxon9HE.jar?
Here's the code, you can also click on the link above to get the code
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="str"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:analyze-string select="." regex="\|((\|\s*[^|]+\s*\|)+)\|"> <xsl:matching-substring> <xsl:analyze-string select="regex-group(1)" regex="\|\s*(\w+):([^|]+?)\s*\|"> <xsl:matching-substring> <xsl:element name="{regex-group(1)}"> <xsl:value-of select="regex-group(2)"/> </xsl:element> </xsl:matching-substring> </xsl:analyze-string> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:copy> </xsl:template> </xsl:stylesheet> Thank you,