List Info

Thread: RE: Database for docbook components (i.e. section, para, etc) questions




RE: Database for docbook components (i.e. section, para, etc) questions
user name
2007-03-16 14:18:16
> Developing the stylesheet was not trivial, but it
produces 
> solid Word documents that require no fix-up. We are,
however, 
> just getting started with this type of conversion.

I wrote about using the DocBook > HTML > Word
technique.  One of the
limitations of that route is that the paragraphs in Word are
not tagged
with paragraph styles.  The content is formatted perfectly
because Word
imports the CSS that is applied to the HTML, however it's
all done by
Word with formatting overrides of "normal" or some
other stock paragraph
style.

Does your solution solve this problem?  Do the resulting
Word documents
use paragraph styles consistently?

For example, using my technique the contents of a DocBook
<entry>
element in a table heading row are mapped to an HTML
<th> element.  Word
picks this up and applies any CSS I specify but tags the
content of the
heading row with "Normal + Arial, Bold, Centered."
 If I were setting up
a Word template, I'd create a paragraph style
"TableHeading" and use it
here.  I wish I could convince Word to tag content with
paragraph styles
based on something useful.  The class names that reflect the
original
DocBook elements would be nice.

Peter Desjardins

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


RE: Database for docbook components (i.e. section, para, etc) questions
user name
2007-03-16 17:00:28
> -----Original Message-----
> From: Peter Desjardins [mailto:pdesjardinssupplyscape.com] 
> Sent: Friday, March 16, 2007 3:18 PM
> To: Nilsson, David F; Nelson, Dean; docbook-appslists.oasis-open.org
> Subject: RE: [docbook-apps] Database for docbook
components (i.e. 
> section, para, etc) questions

> > Developing the stylesheet was not trivial, but it
produces
> > solid Word
> > documents that require no fix-up. We are, however,
just getting
> > started with this type of conversion.

> I wrote about using the DocBook > HTML > Word
technique. One of
> the limitations of that route is that the paragraphs in
Word are
> not tagged with paragraph styles. The content is
formatted
> perfectly because Word imports the CSS that is applied
to the
> HTML, however it's all done by Word with formatting
overrides of
> "normal" or some other stock paragraph
style.

> Does your solution solve this problem? Do the resulting
Word
> documents use paragraph styles consistently?

Yes. The XSLT stylesheet uses its rules to apply styles.

For example, one of the templates in the stylesheet looks
for <para>
elements within <entry> elements. If the enclosing
<table> element has a
"role" attribute set to "small" and the
<entry> element is within
thead/row, the stylesheet writes WordML markup to set the
style on the
paragraph to "TableHeadingSmall." That WordML
would look something like
this:

  <w:tc><w:tcPr><w:tcW w:w="3420"
w:type="dxa"/>
  </w:tcPr>
  <w:p><w:pPr><w:pStyle
w:val="TableHeadingSmall"/>
  </w:pPr>
  <w:r><w:t>Blah, blah, blah.</w:t>
  </w:r>
  </w:p>
  </w:tc>

Here's what some of these elements are:

  w:tc = table cell
  w:tcPr = table cell properties
  w:p = paragraph
  w:pPr = paragraph properties
  w:pStyle = paragraph style
  w:r = run
  w:t = text

WordML is rather unusual XML because it just represents the
Word 
formatting, and you set the formatting with properties,
which 
may be attached to paragraphs, runs, tables, and other
objects.

> For example, using my technique the contents of a
DocBook <entry>
> element in a table heading row are mapped to an HTML
<th>
> element. Word picks this up and applies any CSS I
specify but
> tags the content of the heading row with "Normal +
Arial, Bold,
> Centered." If I were setting up a Word template,
I'd create a
> paragraph style "TableHeading" and use it
here. I wish I could
> convince Word to tag content with paragraph styles
based on
> something useful. The class names that reflect the
original
> DocBook elements would be nice.

> Peter Desjardins

It's nice to have clear style names, but if your documents
are the final
output, I would think it might not matter. The style names
are most
valuable when you're going to be manipulating the formatting
in some
way.

Sometimes, though, we have had customers who have specified
Word
templates with named styles. But usually style names aren't
an issue.

The DocBook XSL stylesheet, as I recall, makes an effort to
use the
DocBook element names in styles.

Dave Nilsson

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )