This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: sgml auto-indenter


/ "Kevin M. Dunn" <kdunn@hsc.edu> was heard to say:
| Does this style break anything?

Yes, if you have a nested set of tags that can contain #PCDATA. The
list example is OK because all of those elements have element content,
but

<filename>
    <replaceable>
         <ulink url="xxx">...</ulink>
    </replaceable>
</filename>

would be a problem because it introduces whitespace into mixed content.

| Can anyone suggest a useful indentation style which would be completely
| benign?

Not without reading the DTD or Schema and making sure that you only add
whitespace to elements that don't have mixed content.

On the subject of whitespace, note that the carriage return after the
<para> start tag is significant in XML.

<para>
Some sentence.

It's better to use either

<para>Some sentence

or

<para
>Some sentence

Although the latter confuses some simple parsing tools.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | Simplicity is always a
http://www.oasis-open.org/docbook/ | virtue.--Edward Abbey
Chair, DocBook Technical Committee |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]