pretty printing multiple files
Are you missing a feature? Request its implementation here.
-
- Posts: 2
- Joined: Thu Dec 05, 2013 6:44 pm
pretty printing multiple files
Hi,
I'd like to pretty print multiple XML files. There is this very useful button that applies pretty printing on the currently opened file. However, I would like to apply pretty rpinting on a whole folder without opening each of its XML-files.
I see one work around by defining an XSL-transformation scenario containing the copy template and an <output indent="yes"/>. But then I can't see how I could configure indention rules like I could do in oXygen's Preferences/Editor/Format/XML.
Is there a away to have this configurable formatting applicable on several files in a batch?
Regards
Immanuel
I'd like to pretty print multiple XML files. There is this very useful button that applies pretty printing on the currently opened file. However, I would like to apply pretty rpinting on a whole folder without opening each of its XML-files.
I see one work around by defining an XSL-transformation scenario containing the copy template and an <output indent="yes"/>. But then I can't see how I could configure indention rules like I could do in oXygen's Preferences/Editor/Format/XML.
Is there a away to have this configurable formatting applicable on several files in a batch?
Regards
Immanuel
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: pretty printing multiple files
Hello,
Currently (v16.0) there is no specialized batch Format and Indent operation in Oxygen. We have a feature request already logged for this, I've added your vote.
The XSL processor can be used as a workaround with a copy stylesheet, but note that it removes DOCTYPE declarations and by default it also expands default attribute values. The latter, Expand attribute defaults, can be disabled in the Saxon transformer Advanced options (cogwheel icon) from the transformation scenario.
From what I see, for Saxon-PE/EE you can control a few aspects of indenting/serialization with the help of a few Saxon specific attributes: Saxon > Saxon Extensions > Additional serialization parameters
An alternative workaround would to be enable the option Format and indent the document on open from Options > Preferences > Editor > Format. Then you would have to open all the documents you want formatted from the Project view (maybe in a few smaller batches if there are too many) and save all of them at once(File > Save All). You will probably want to disable the option afterwards since it affects all documents.
Regards,
Adrian
Currently (v16.0) there is no specialized batch Format and Indent operation in Oxygen. We have a feature request already logged for this, I've added your vote.
The XSL processor can be used as a workaround with a copy stylesheet, but note that it removes DOCTYPE declarations and by default it also expands default attribute values. The latter, Expand attribute defaults, can be disabled in the Saxon transformer Advanced options (cogwheel icon) from the transformation scenario.
From what I see, for Saxon-PE/EE you can control a few aspects of indenting/serialization with the help of a few Saxon specific attributes: Saxon > Saxon Extensions > Additional serialization parameters
Code: Select all
<xsl:stylesheet version="2.0"
e.g. Indent with 4 spaces
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/">
<xsl:output indent="yes" saxon:indent-spaces="4"/>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service