I was reading today an internal distribution list and I saw an interesting thread about autonumbered lists using WordML (2003):
"I embarked on a journey to try and transform InfoPath rich text (xhtml) to WordML. I encounter a problem when I try to transform a rich text node that contains multiple numbered lists: in the rich text they both number from 1-3, but in Word the result is 1,2,3 and 4,5,6."
Zander Westendarp provides a great workaround: If you increment the value of the w:listDefId elements for each element, you can get autonumbered lists that always restart the numbering.
When I work with WordML or SpreadsheetML, I always build a template of the document/spreadsheet that I want to generate and save it as XML. It's the best way to get started with the code that you want to generate. I made an experiment to test this approach and explore the resulting WordML. Follow these simple steps...
Once you create the XML Document file, you can open the file using a text editor program to explore the content of the file. Find all the w:listDef elements and you will see how the w:listDefId attribute is always incremented.
Tip: If you want to see a nice and readable indented XML file, see this blog entry.I know that WordML is a big topic and every document is a separate story. Newsgroups, forums, and DLs are always full of different questions. Taking about lists is just a single topic - that by the way is huge and complex by itself. Fortunately there are documents, articles, books, and cool bloggers who share their knowledge.
Here are some WordML resources that I use when I am stuck with WordML:
If you want to learn more about lists and WordML, read Oleg Tkachenko's blog entry: Generating WordprocessingML using XSLT: Lists. Also read John Durant's blog entry: WordProcessingML, XML, and Lists.
Finally, to learn WordML, divide and conquer, that's my strategy...
To me it seems the entire auto-numbering gets evaded by doing manual numbering instead. Every list entry has a wx:val set which indicates their actual number.
PingBack from http://paidsurveyshub.info/story.php?title=erika-ehrli-how-to-generate-autonumbered-lists-using-wordml-2003