Hi,
thanks for sharing your views. I also managed to implement this to a greater extent. Everything works fine but one problem remains. Suppose we are having a list in word like this:
1. aa
2. bb
2.1 cc
2.2 dd
2.2.1 111
2.2.2 22222
3. ee
3.3 ff
3.4 gg
My code would generate somethin like this:
as you can see, the sublist under the 'ee' has got itself appended to the 'bb' also :(
I am also using a for-loop to go through the sibling nodes, but for each of these nodes, I want to get the first preceding sibling of that node, which has a 'ilvl' less than this sibling node. I want to get this node, so that I can compare it with the calling node. I am trying to use generate-id function here.
In words, it is something like this: At each sibling node, get the node id of its first preceding sibling, which has a ilvl value one less than this current sibling node.
What I had in mind is something like this, but it does not work L
<xsl:variable name="lastIndList" select="generate-id(preceding-sibling::w:p[preceding-sibling::w:p/w:ilvl/@w:val < descendant::w:ilvl/@w:val][1])" />
For example, if 'bb' is the calling node for the sublist, I want to make sure that the preceding sibling of 'ff' is not coming under 'bb', so it would not append itself to 'bb'.
I know this is pure XSLT issue, but since I'm a newbie to XSLT, I have been struggling with this for days. Hope you can help me to figure this out.
thanks in advance,
/Suralk
ps- yeah, u r right. word 2007 has much worse xml than 2003 I think. In 2003, youh ave everything you need in one XML file I think, but for 2007, you have to access a whole lot of other XML's also. As for the lists, the style information is stored ina separate numbering.xml, so you have to read that also :(