Project

Profile

Help

Support #1343

closed

Too many nested apply templates

Added by Anonymous over 18 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Internals
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Legacy ID:
sf-1380609
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

SourceForge user: geoffhopkins

Error will become apparent when running XSLT with XML

source... if one line is removed the

program works ok... Can't provide the true source for

confidentiality reasons,,, the true source is actually

7000 lines between point A and B.

<xsl:stylesheet version="2.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}" 

doc_type="1">

		<xsl:apply-templates 

select="text[contains(.,'R[') or contains(.,'Service

Function Requirements') or contains(.,'Application

Software Requirements')][1]"/>

	</artefact>

</root>

</xsl:template>

<xsl:template match="text">

<xsl:if test="not(contains(.,$SSDD_START))">

	<xsl:if test="starts-with(.,'R[') 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>


Files

input.xml (9.56 KB) input.xml Anonymous, 2005-12-14 18:02

Please register to edit this issue

Also available in: Atom PDF