batch - join and normalize

Questions about XML that are not covered by the other forums should go here.
AE2012
Posts: 3
Joined: Wed Jan 25, 2012 1:24 pm

batch - join and normalize

Post by AE2012 »

Hi all,
is there any way to apply the function document->source->join and normalize to more than one file?

Or any (fast) xslt/xquery solution to get the same result? (~40000 files à 50kb)

Best
Arne
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: batch - join and normalize

Post by adrian »

Hi,

The Join and Normalize operation is only available in the editor. There is no batch counterpart.

However, you could use the Find/Replace in Files tool from Oxygen to do the same on multiple files. I recommend creating a backup copy of the files before performing this operation on them.

Because of the nature of the Find/Replace in Files tool (limited to matches on the same line up to v13.2) you will have to perform this replace operation twice.
Use:
Text to find: '\s+' (without the quotes)
Enable Regular expression.
Replace with: ' ' (a space character without the quotes).

Make sure the correct Scope is selected and that the Include files filter covers your files. Recurse subdirectories should also be enabled if you want to search deep in directories.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply