Leos Literak wrote:
> 
> It is able to make resulting XML look nice for some tags,
> which doesn't contain any children:
> 
>    <translator lang="Czech" contact="http://AbcLinuxu.cz"; />
> 
>    <issue date="16 Sep 2002 00:00:00 -0700" num="184" />
> 
> but for others, it combines them:
> 
> <section title="VideoEntropie"
> subject="kernel &#38; entropy: introducing video-entropyd" archive=""
> posts="1" startdate="09 Sep 2002 11:02:16 -0700"><p>Folkert van Heusden
> ohl?sil zaj?mav? projekt video-entropyd:</p> <quote
> who="Folkert van Heusden"> <p>Z bezpe?nostn?ch d?vod?
> entropn?ch dat, nemus? b?t schopen je z?skat s?m.</p> <p>A pro tyto ??
> zde tento program: dod?v? entropii do jadern?ho ovlada?e. D?l? to tak,
> crontabu ka?dou minutu.</p> <p>Folkert program otestoval s webovou
> od firmy Philips. Najdete jej na adrese <a
> href="http://www.vanheusden.com/ved/";>http://www.vanheusden.com/ved/</a>.
> Podobn? probl?m pro audio je ?e?en na adrese.</p>
> </quote></section>
> 
> this looks very ugly.
> 
> It does it not only to XMLs with auto-generated DTD (above examples),
> but even to docbook:
> 
> to, the message request that message, the template used, and
> any other information the syss about the message. </para> </listitem>
> </orderedlist> </msgtext> </entry> </row> <row> <entry>Exceptions</entry>
> <entry>none</entry> </row> </tbody> </tgroup> </table> </para>
> <para> <table frame="all"> <title>Revoke message</title> <tgroup
> align="char" cols="2" char="." charoff="50"> <tbody> <row>
> <entry>Description</entry>
> 
> I would love to have human-friendly formatting:
> 
> <table frame="all">
>   <title>Revoke message</title>
>    <tgroup align="char" cols="2" char="." charoff="50">
>     <tbody>
>      <row>
>       <entry>Description</entry>
> 
> I checked indentation in save tab in preferences dialog,
> but it doesnt help. Any idea?

Ouput is cannot be indented for invalid elements.

Let's assume your document is valid and the indent checkbox in the
Options dialog box is checked.

The following examples, directly copied from a file saved by XXE V2, use
the DocBook DTD but everything said here is also true for any DTD or XML
Schema:

* Elements that can contain text (i.e. mixed elements) are formatted
like this:

  <para>this is a paragraph containing a <emphasis>emphasis</emphasis>
and a
  <literal>literal</literal> too.</para>

* Elements that can only contain child elements are formatted like this:

  <table>
    <title>Title of the table</title>

    <tgroup cols="2">
      <tbody>
        <row>
          <entry>Cell 1,1</entry>

          <entry>Cell 1,2</entry>
        </row>

        <row>
          <entry>Cell 2,1</entry>

          <entry>Cell 2,2</entry>
        </row>
      </tbody>
    </tgroup>
  </table>

___Unless this type of element is contained inside a mixed element___[*]

In DocBook, you can insert a table inside a para (but not inside a
simpara) and true, this gives you this ugly formatting (for the table):

  <para>this is a paragraph containing a table <table><title>Title of
the
  table</title><tgroup cols="2"><tbody><row><entry>Cell
1,1</entry><entry>Cell
  1,2</entry></row><row><entry>Cell2,1</entry><entry>Cell
2,2</entry></row></tbody></tgroup></table>but
  also <emphasis>emphasis</emphasis>.</para>

But why including a table inside a para?

This being said, It should be possible to improve case [*]

Reply via email to