WordML wx:section and w:sectPr issues

J

Justin Gentry

Hello all,

I've been working with WordML and xslt for a couple weeks and am
finding discrepencies with what gets produced. Intuitively I would
assume that for each section in the word document, the WordML xml
would contain one wx:section element, with all of the section
contained within. In actual practice however, the results vary.

I've found that if you create a new word doc and insert the sections
first, then the resultant xml will contain what one would think, one
wx:section for every section in the doc.

However, if you create the document differently, sometimes you will
only get one wx:section, or maybe several, but not all that you would
expect. As an example I'm working with a document that has 11
tables, and after each table a section break. When I save it to xml I
get 4 wx:sections, with the last wx:section containing the last 8
tables.

Word does include one w:sectPr for each section, but working with that
is almost impossible with xslt. As an example, I am trying to convert
each section into an html div tag (working with the beta Word2ML.xsl
translation that Microsoft provides) Word2ML transforms the
wx:sections, but doesn't touch the w:sectPr elements except to access
the first in a section for page formatting issues.

Does anybody know how Word determines how it formats its xml? What
makes it choose to create a new section versus putting the section in
the existing. I've been working with this for a while, and nothing is
really apparent.

Thanks,

Justin Gentry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top