|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Error: when distance between section definitions
So, what should be the output?
--
Cheers,
Dimitre Novatchev
---------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all.
On 12/1/05, geoff hopkins <geoffhopkins123@xxxxxxxxx> wrote:
> The basic premise of the xsl below is to define
> sections that fall between two marker points
> 'Application Software Requirements and 'Service
> Function Requirements' . The problem I have is if
> these two marker points have roughly 3678 (or more)
> other nodes between then
>
> i.e.
>
> 1. <root>
> 2. <text>'Application Software Requirements</text>
> 3. <text></text>
> ..
> ..
> 3685. <text>Service Function Requirements</text>
> 3686. <text></text>
> </root>
>
> I get this error message (MSXML4.0)
> Code: 0x80004005
> The XSL Processor stack has overflowed - probable
> cause is infinite template recursion.
> I get this error message (Saxon 6.5.3)
> An exception of type 'java/lang/StackOverflowError'
> was not handled
>
> Unfortunately I am tied into MSXML for this project,
> any ideas why this is happening? do I need to redefine
> my xsl, if yes will need a good guide as I am quite
> rubbish at it.
>
> Regards,
>
> Geoff
>
> p.s. can't supply the source xml as it contains
> sensitive data.
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="xml" indent="yes"/>
> <xsl:variable name="SSDD_START">Application Software
> Requirements</xsl:variable>
> <xsl:variable name="SSDD_STOP">Service Function
> Requirements</xsl:variable>
> <xsl:variable name="REQ_START">R[</xsl:variable>
> <xsl:variable name="REQ_STOP">]</xsl:variable>
>
> <xsl:param name="DOC_REF"/>
>
> <xsl:template match="pdf2xml">
> <root>
> <artefact doc_ref="{$DOC_REF}">
> <xsl:apply-templates select="text[1]"/>
> </artefact>
> </root>
> </xsl:template>
>
> <xsl:template match="text">
> <xsl:if test=".!=contains(.,$SSDD_START)">
> <xsl:if test=".=starts-with(.,$REQ_START) and
> substring(.,string-length(.),1)=$REQ_STOP">
> <instance type_id="1">
> <xsl:attribute name="doc">
> <xsl:value-of select="$DOC_REF"/>
> </xsl:attribute>
> <xsl:attribute name="sec">
> <xsl:value-of select="."/>
> </xsl:attribute>
> </instance>
> </xsl:if>
> </xsl:if>
> <xsl:apply-templates
> select="following-sibling::text[1]"/>
> </xsl:template>
>
> <xsl:template match="text[contains(.,'Service Function
> Requirements')]">
> <xsl:apply-templates
> select="following-sibling::text[contains(.,$SSDD_START)][1]"/>
> </xsl:template>
>
> <xsl:template match="text[1]">
> <xsl:apply-templates
> select="following-sibling::text[contains(.,$SSDD_START)][1]"/>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








