This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: numbering empty entities


> 
> <xsl:template match="TABLE1/*[1]">
> 	<xsl:element name="TABLE1_LNR">
> 		<xsl:number count="TABLE1" level="single"/>
> 	</xsl:element>
> 	<xsl:copy>
> 		<xsl:apply-templates select="node()"/>
> 	</xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
> 
> The stylesheet doesn't add the number to the empty entity. The reason
> is, that the pattern "TABLE1/*[1]" doesn't match. But how can 
> I resolve the task?

Just do:

<xsl:template match="TABLE1">
<TABLE1>
  <TABLE1_LNR><xsl:number/></TABLE1_LNR>
  <xsl:apply-templates/>
</TABLE1>
</xsl:template>

Mike Kay
Software AG

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]