[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Schema-aware pretty-printing
On Wed, Dec 21, 2011 at 09:48:59PM -0500, Murray McDonald scripsit: > 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. Oxygen's format-and-indent is fully general in as much you can tell oXygen which arbitrary elements are preserve-space and in that the contents of mixed-content elements gets left in an unindented state. > 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? I can't imagine doing any significant amount of XSLT programming _without_ using oXygen; I also can't imagine that you won't get your purchase price back in saved time _just with this problem_, never mind the subsequent year. The other solution is to not try to hand-edit the PIs in place; presumably you can identify their location with very specific XPath, the kind that has position numbers after every element down from the root, and mechanically insert them via XSLT. The one-template-per-path approach plus copy-constructor has the virtues of extending nicely and repeatability but also the fault of requiring you to identify all those locations precisely. -- Graydon
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|