xsl-list
[Top] [All Lists]

Re: [xsl] XML pretty printer

2011-09-27 22:00:34
On Tue, 2011-09-27 at 04:39 -0700, John Christopher wrote:

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

Well, you have CDATA in your attribute values, strictly speaking :-) but
I think you mean no element content.

(I hope you don't plan to localise this to Japanese!)

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

I think an example was already posted that will probaly do what you
need; if not, it's a case of modifying the "identity transform" to treat
the attributes specially. You will need to lie and say you are
generating text, not XML, of course.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/


--~------------------------------------------------------------------
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>