[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Schema-aware pretty-printing

Subject: Re: Schema-aware pretty-printing
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 22 Dec 2011 11:33:10 +0000
Re:  Schema-aware pretty-printing
If you do an identity transform in Saxon, with schema-validated input and indented output, then it will do indentation of elements with element-only content, and no indentation of elements with mixed content. I think. But I might think wrong, because I'm on vacation.

Michael Kay
Saxonica


On 22/12/2011 02:48, Murray McDonald wrote:
Hi,

I have a some very large XML source files.  Each is are currently formatted
as one long string (ie no line breaks).

I need to add some processing instructions at various points in the file but
I don't want to introduce any significant whitespace in the process of doing
so.

I have XMLSpy but it does not seem to be capable of doing a schema-aware
"pretty-print".

A web search seems to indicate that OXygen is capable of doing an
intelligent pretty-print (the information I found is in the context of XHTML
but I assume it's more generalized than that??), however, I can't really
justify buying it just for that.

If needs be, I can write an XSLT to parse a DTD, classify each element as
"inline", "mixed", "block" or "empty" and then do an identity transform
against my XML source files inserting line-breaks and leading tabbing as
required.

I am wondering if anyone else has any other suggestions for me?

Thanks,

Murray

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.