XSL error: An xsl:template element must not contain an xsl:template element

BreakOB1

New Member
After executing xsl, getting an error:\[quote\] because of: An xsl:template element must not contain an xsl:template element; SystemID: file:/C:/xslt/CombineToOutput.xsl; Line#: 19; Column#: -1 Element must be used only at top level of stylesheet; SystemID: file:/C:/xslt/CombineToOutput.xsl; Line#: 19; Column#: -1 (Failed to compile stylesheet. 2 errors detected.) (Failed to compile stylesheet. 2 errors detected.)\[/quote\]the XSLT\[code\]<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.openapplications.org/oagis/9"> <!-- STICKER INFO COMBINETOOUTPUT--> <xsl:template match="/"> <xsl:apply-templates select="child::node()/*[name()!='DbResponse']"/> </xsl:template> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="*:PurchaseOrder"> <xsl:apply-templates select="*:PurchaseOrderLine/Item/CustomerItemID/ID"/> <xsl:template match="*:PurchaseOrderLine/Item/CustomerItemID/ID"> <xsl:variable name="ArtNr" select="/*/ProcessPurchaseOrder/DataArea/PurchaseOrder/PurchaseOrderLine/Item/CustomerItemID/ID"/> <xsl:variable name="WepNr" select="/*/DbResponse/ResultSet/Row[Cell[@name='ARTNR']=$ArtNr]/Cell[@name='WEPNR']"/> <xsl:copy> <xsl:if test="$WepNr!=''"> <LineNumber><xsl:value-of select="$WepNr"/></LineNumber> </xsl:if> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:template></xsl:stylesheet>\[/code\]
 
Back
Top