xsl-list
[Top] [All Lists]

Re: [xsl] XML pretty printer

2011-09-27 06:39:57
Dear Liam,

Thank you for replying.  My comments are at
the bottom.

----- On Mon, 2011-09-26, I wrote:

I am looking for a stylesheet (or free software
that runs from the command line on linux) that
will take the following input:
[...]

and pretty prints it like this (each attribute
printed on a separate line beneath the element
and indented):


----- You were kind enough to reply:

what should it do with

<paragraph breakable="no">This is a <emphasis>short</emphasis>
paragraph as an <italic>ex</italic>ample.</paragaph>
?

What about
<script type="text/javascript">
var i; // loop variable
i = 3; // assignment
alert("i is " + i); // coercion
</script>
?


My data only contains elements with attributes
and no CDATA or PCDATA.

If my data *did* contain CDATA or PCDATA, the
formatter should leave the data alone, but
properly indent the surrounding tags.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>