Getting rid of pretty-print
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 178
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Getting rid of pretty-print
Post by martindholmes »
I have a stack of documents that have been damaged by the use of pretty-print -- by which I mean that someone editing the files, who didn't really understand pretty-print and how to configure it, has pretty-printed thousands of instances of mixed content where spaces and returns shouldn't actually exist.
I thought I'd be able to fix this easily using regular expressions, but of course I can't, because oXygen regexp matches only work within lines, and pretty-rinting runs across lines.
Is there any other way to fix this in oXygen, or should I just move the files to another editor to do the work?
Cheers,
Martin
I thought I'd be able to fix this easily using regular expressions, but of course I can't, because oXygen regexp matches only work within lines, and pretty-rinting runs across lines.
Is there any other way to fix this in oXygen, or should I just move the files to another editor to do the work?
Cheers,
Martin
Hi,
A possible approach is to write an XSL and pass your damaged documents through that. You can start with an identity template (type ct followed by CTRL+Space in the oXygen XSL editor to get it) and add match rules to the elements you want to process differently (by normalizing the text for instance).
If you use XSLT 2.0 then you should be able to use regular expressions as XSLT 2.0 has regex support.
As a side note, it is best to use a versioning system like CVS or SVN. oXygen will offer SVN support soon and if you use the Eclipse plugin (note that the license covers both the standalone and the Eclipse plugin) then you should be able to use already the Eclipse versioning plugins for CVS, SVN, etc.
Best Regards,
George
A possible approach is to write an XSL and pass your damaged documents through that. You can start with an identity template (type ct followed by CTRL+Space in the oXygen XSL editor to get it) and add match rules to the elements you want to process differently (by normalizing the text for instance).
If you use XSLT 2.0 then you should be able to use regular expressions as XSLT 2.0 has regex support.
As a side note, it is best to use a versioning system like CVS or SVN. oXygen will offer SVN support soon and if you use the Eclipse plugin (note that the license covers both the standalone and the Eclipse plugin) then you should be able to use already the Eclipse versioning plugins for CVS, SVN, etc.
Best Regards,
George
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