Hello,

I have a task to combine a single DocBook XML file from several other source 
DocBook XML files. This is done with some Perl script. Next, I'm trying to 
prettify the result (also from inside my Perl script) using the following xslt 
stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
  <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

In this resulting XML, I get the following formatting:

    <section>
      <title>Title</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="col2" colnum="2" colwidth="4*"/>
          <tbody>
            <row>
              <entry>Some text</entry>
              <entry>
                <para>Some text</para>
                <para>Some text</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>

But I need the <para>s inside the <entry> to stick together:

    <section>
      <title>Title</title>
      <informaltable>
        <tgroup cols="2">
          <colspec colname="col2" colnum="2" colwidth="4*"/>
          <tbody>
            <row>
              <entry>Some text</entry>
              <entry>
                <para>Some text</para><para>Some text</para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </section>

Even if these <para>s are on the same line in my source file, in the combined 
file they jump to different lines because of the formatting and indenting.

What changes shall I introduce in my xslt stylesheet to solve this?

Thank you!

--
Best regards,

Ekaterina Shikareva
Senior Technical Writer


________________________________

This e-mail and any attachment(s) are intended only for the recipient(s) named 
above and others who have been specifically authorized to receive them. They 
may contain confidential information. If you are not the intended recipient, 
please do not read this email or its attachment(s). Furthermore, you are hereby 
notified that any dissemination, distribution or copying of this e-mail and any 
attachment(s) is strictly prohibited. If you have received this e-mail in 
error, please immediately notify the sender by replying to this e-mail and then 
delete this e-mail and any attachment(s) or copies thereof from your system. 
Thank you.

Reply via email to