[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] one line of xml to indented xml doc
Subject: Re: [xsl] one line of xml to indented xml doc From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx> Date: Sun, 24 Mar 2002 18:17:28 -0500 |
[Astor Rivera] Thanks for the help, although I may not have explained what I really needed. You did point out some redundancy I found later that evening. What I was trying to transform is a single line of xml being output from a C++ app, I must then take it and make it a well formed document with a hierachical structure and the transform is being done using MSXSL. It must remain generic as the output tags will always vary. [Tom P] Maybe you don't have to indent it at all. If the xml is correctly structured as it comes from the C++ source, it will work fine with any ordinary xm processor. Therefore I assume that you want it indented so a person can read it more easily. It's not so easy to do good pretty printing of arbitrary xml, especially without adding whitespace (like line feeds and tabs) to the text in places. If your xslt processor isn't doing the job, there are a number of pretty-prining stylesheets out there, which do varying quality jobs. I did one myself, and I image Jeni and Mike Kay have their own. However, if you just want to look at the output once in a while, perhaps while you are developing your application, it might be easiest just to use HTML Tidy, which does a pretty nice job. It's part of a number of packages incuding Chami's HTML-Kit and XML Cooktop (both free Windows programs). Tidy can be configured to work with xml input instead of html, despite its name. Or you can view the xml with Internet Explorer, which does a nice job. If this is not what you want, it would be helpful if you explain what you want to accomplish by indenting your xml. Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] one line of xml to indent, Astor Rivera | Thread | Re: [xsl] one line of xml to indent, Peter Davis |
Re: [xsl] Working with 2 namespaces, J.Pietschmann | Date | [xsl] executing template at stylesh, Suresh Babu |
Month |