xsl-list
[Top] [All Lists]

Re: wordml to docbook

2005-12-06 11:39:23
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(_at_)gmx(_dot_)de> 
12/06/2005 11:13 AM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
cc

Subject
Re: [xsl] 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 don´t 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--