Skip to main content
ScottPrentice
Inspiring
May 27, 2013
Question

Conversion table wrapping of character styles

  • May 27, 2013
  • 1 reply
  • 793 views

I've never tried to do this before, but now that I do it seems it can't be done. I'd like to wrap a text range (tagged with a character style) in two elements. Let's say I've got a character style called "bold-italic" and I want to wrap it in .. "b" and "i" elements ..

     <i><b>bold italic text</b></i>

I'd expect this conversion table to do the job ..

Wrap this objectIn this elementWith this qualifier
C:bold-italicbbi
E:b[bi]i

.. but it doesn't seem to work.

Am I doing something wrong ot is this a known limitation?

Thanks!

...scott

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
May 28, 2013

Hmm .. never mind .. I don't know why it wasn't working, but it is now. Probably means that I shouldn't be working on a holiday.  :-o

Cheers,

...scott

Inspiring
May 23, 2016

Hi Scott,

Did you have the problem again sometime? I'm having kind of the same problem, except sometimes the wrapping is correct. But in some places "bold-italic" is only wrapped in <b>.

This is my unstructured document:

This is a test. This is a test. 
This is a test. This is a test.
This is a test. This is a test.
This is a test. This is a test.
This is a test. This is a test.

("test" is bold-italic in every paragraph. "is" is italic in the 1st sentence of the 4th paragraph.)

After conversion, my structured document looks like this:

<para>This is a <i><b>test</b></i>. This is a <i><b>test</b></i>.</para> 
<para>This is a <b>test</b>. This is a <i><b>test</b></i>.</para>
<para>This is a <b>test</b>. This is a <i><b>test</b></i>.</para>
<para>This <i>is</i> a <i><b>test</b></i>. This is a <i><b>test</b></i>.</para>
<para>This is a <b>test</b>. This is a <i><b>test</b></i>.</para>

It only seems to work in the first paragraph of the document or when there's another character format in the same paragraph before.

Any idea how to fix this?

Thanks!

Sebastian

Inspiring
May 23, 2016

If nothing helps, tag those bold-italics as <b_i> and run a XSLT afterwards.

Conversion tables can do a fine job, but sometimes you just better work around them.

Speeds up the process and the result is the same or even better.

-Alex