W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 1999

xml pretty print

From: Tim Arnold <tiarno@wnt.sas.com>
Date: Thu, 2 Dec 1999 08:50:45 -0500
Message-ID: <DB8AFFD38A30D311BA6D0090276DC8C00125EC36@merc09.us.sas.com>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
Hi,
Thanks for html-tidy!  
In a previously posted problem (thanks, Jelks)
concerning inline XML tags, HTML-TIDY (30Nov release)
breaks the tagged information into separate lines. 
For the following example, suppose the config file 
contains the line 
	new-inline-tags: foo
======xml source=========
<doc>
   <fee><fi><fo><foo>foo stuff</foo></fo></fi></fee>
</doc>
=====tidy output==========
<doc>
  <fee>
    <fi>
      <fo>
        <foo>
          foo stuff
        </foo>
      </fo>
    </fi>
  </fee>
</doc>
================
The middle line should read 
'<foo>foo stuff</foo>' with no linebreaks.

As Dave suggested, the PPrintXMLTree subroutine simply 
needs the same tag-checking routines as PPrintTree 
subroutine. I copied the routines over, with a few 
tweaks on where declarations were made, and viola! 
it works. That is,
=====new tidy output==========
<doc>
  <fee>
    <fi>
      <fo><foo>foo stuff</foo></fo>
    </fi>
  </fee>
</doc>
================
Thanks,
--Tim Arnold
Received on Thursday, 2 December 1999 08:51:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT