i have to convert some xml information to text. The critical issue i have is that my template instantiation requires me to add extra text information to the text file. For example suppose my xml document looks like this:
<Dir Path="..">
<File>xyz.xml</File>
</Dir>
<Dir Path="C:\Temp">
<Wildcard>*.xml</Wildcard>
</Dir>
and i need to check for this node which i do using <xsl:template match="Dir"> and after the XSL processor instantiates this template i need to write text to my basic text file like this
1. Type="Dir"
2. Path="C:\Temp">
3. File=xyz.xml
4. EOD ( means end of dir )
5. Type="Dir"
6. Path="C:\Temp">
7. Wildcard= *.xml
8. EOD ( means end of dir )
when i wrote a transformation using xsl:number or xsl:value-of select="position()" and used count for any level, it counts based on nodes so it says
1. Type="Dir"
1. Path="C:\Temp">
1. File=xyz.xml
1. EOD ( means end of dir )
for the first template match and the next template match would give:
2. Type="Dir"
2. Path="C:\Temp">
2. Wildcard=*.xml
2. EOD ( means end of dir )
My question is how do i get the 1.2.3.4 format numbering format for the added text for each template? i use <xsl:text> to add text for each node type. Any inputs on this is very much appreciated!
Thanks
<Dir Path="..">
<File>xyz.xml</File>
</Dir>
<Dir Path="C:\Temp">
<Wildcard>*.xml</Wildcard>
</Dir>
and i need to check for this node which i do using <xsl:template match="Dir"> and after the XSL processor instantiates this template i need to write text to my basic text file like this
1. Type="Dir"
2. Path="C:\Temp">
3. File=xyz.xml
4. EOD ( means end of dir )
5. Type="Dir"
6. Path="C:\Temp">
7. Wildcard= *.xml
8. EOD ( means end of dir )
when i wrote a transformation using xsl:number or xsl:value-of select="position()" and used count for any level, it counts based on nodes so it says
1. Type="Dir"
1. Path="C:\Temp">
1. File=xyz.xml
1. EOD ( means end of dir )
for the first template match and the next template match would give:
2. Type="Dir"
2. Path="C:\Temp">
2. Wildcard=*.xml
2. EOD ( means end of dir )
My question is how do i get the 1.2.3.4 format numbering format for the added text for each template? i use <xsl:text> to add text for each node type. Any inputs on this is very much appreciated!
Thanks