[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: wordml to docbook

Subject: Re: wordml to docbook
From: Steve Ball <Steve.Ball@xxxxxxxxxxxxxx>
Date: Wed, 7 Dec 2005 14:59:06 +1100
wx sub section
My experience with WordML is that:

a) The wx:sect elements are used to separate physical sections in the
document, eg. changing the number of columns or changing the page
orientation.  They are not helpful (in fact, they're disruptive) when
trying to build the logical structure of the document,

b) the wx:sub-section elements are unreliable.  It seems that Word
tries to guess where the logical sections start and often gets it wrong.

For reliability I do two things: (i) flatten the structure,
eliminating all wx:sect and wx:sub-section elements and (ii) group
sections based on the styles of the paragraphs.  Of course, this
relies on the author using styles correctly (an authoring problem,
rather than a technical problem).

Cheers,
Steve Ball

---

Steve Ball            |   XSLT Standard Library   | Training & Seminars
Explain         |     Web Tcl Complete      |   XML XSL Schemas
http://www.explain.com.au/ |      TclXML TclDOM        | Tcl, Web
Development
Steve.Ball@xxxxxxxxxxxxxx  +---------------------------
+---------------------
Ph. +61 2 6242 4099   |   Mobile (0413) 594 462   | Fax +61 2 6242 4099


On 07/12/2005, at 5:39 AM, JBryant@xxxxxxxxx wrote:


Are you getting the WordML document from Word or from some other
process?
If someone is saving Word documents as WordML that you must then
process,
you should be getting wx:sect and wx:sub-section elements, which
you can
use for grouping. The wx:sect and wx:sub-section elements enable
grouping
because Word inserts them at each level of heading (rather than
with each
and every heading), something like this:

<wx:sect>
  <wx:sub-section>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="Heading1"/>
      </w:pPr>
      <!-- more elements here -->
    </w:p>
    <w:p>
      <w:pPr>
        <w:pStyle w:val="Heading1"/>
      </w:pPr>
      <!-- more elements here -->
    </w:p>
    <wx:sub-section>
      <w:p>
        <w:pPr>
          <w:pStyle w:val="Heading2"/>
        </w:pPr>
        <!-- more elements here -->
      </w:p>
      <w:p>
        <w:pPr>
          <w:pStyle w:val="Heading2"/>
        </w:pPr>
        <!-- more elements here -->
      </w:p>
    </wx:sub-section>
  </wx:sub-section>
</wx:sect>

So, assuming that you are getting the wx:sub-section elements, you
can use
them to identify the groups of headings (and other paragraphs that
go with
the headings, of course).

If you are not getting the wx:sub-section elements, then you have a
fairly
normal grouping problem, to which you can find solutions in Dave
Pawson's
FAQ and Jeni Tennison's web site.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




"Silvia Liberto" <SLiberto@xxxxxx> 12/06/2005 11:13 AM Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc

Subject
Re:  wordml to docbook







Your input format has something like this (simplified)

<p style="level1">
blah
</p>
<p style="level2">
blah
</p>

correct?
yes you are right!
i can transform all the elements inside of <p>...</p>
and i can create the sect1 but my problem is now,
if style="level1" i create <sect1> and all elemets which are
inside of this <p>-tag shoud be inside.When the style"level2" comes
i want to open a <sect2> inside of <sect1> and all elements of
this <p>-tag with level2 should be inside and so one...and this
opening of <sect2> without closing <sect1> is my problem!

i don4t know where of my templates i have to step in that the rest
of the element of a certain level of <p> gets inside!?

i want this:
<sect1>
   <title>1</title>
   blabla
   <sect2>
    <title>2</title>
     blabla
    <sect3>
     <title>3</title>
      blabla
    </sect3>
   </sect2>
</sect1>
<sect1>
<title>1</title>
blabla
</sect1>

Silvia Liberto


-- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.