Latin Lorem Ipsum Batch Conversion

Questions about XML that are not covered by the other forums should go here.
binar
Posts: 26
Joined: Wed Apr 10, 2019 7:43 pm

Latin Lorem Ipsum Batch Conversion

Post by binar »

Is it possible for my OxygenXML XML Editor (v21) to batch convert 160 XML files to Latin Lorem Ipsum text? My 160 XML files conform to the S1000D Specification and contain JPG image references which I would also like changed so that all proprietary JPG images are replaced with a single generic JPG image in the PDF render.

In short, my goal is to publish all 160 XML files into a single PDF file that shows all English text converted to Latin Lorem Ipsum text and all JPG images display using a single generic JPG file.

Can OxygenXML Editor perform such a batch conversion with no impact to the XML tags themselves and only the English text content gets changed to Latin Lorem Ispsum within the XML file? I need to generate such a PDF for privacy purposes.

Lastly, if such a conversion cannot be done using OxygenXML Editor can anybody in this forum please point me to where I could find such a software utility capable of performing such a conversion? Any advice welcome.
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: Latin Lorem Ipsum Batch Conversion

Post by adrian_sorop »

Hi,
The Randomize XML Text Content is what you need to randomize the text content of an XML document.
The XML tags elements will not be changed.
This action will not affect the images, but we can fix that: Add/Change attribute XML Refactoring action. Apply this action and replace the value of the href image elements with a generic image.
Let me know if you encounter any difficulties,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
binar
Posts: 26
Joined: Wed Apr 10, 2019 7:43 pm

Post by binar »

Admin, please delete. I was not able to do it.
Last edited by binar on Thu Aug 11, 2022 12:07 am, edited 3 times in total.
binar
Posts: 26
Joined: Wed Apr 10, 2019 7:43 pm

Re: Latin Lorem Ipsum Batch Conversion

Post by binar »

Adrian,
Thank you very much for your post. I have not yet done any testing so I hope you can clarify the following before I start testing. Does your Randomizer insert Latin Lorem Ipsum text to replace the existing English text? Or does it just scramble English words without relying on using Latin words? So for example an English word such as "BIKE" gets randomized to "EKBI" after your Randomizer is done with the conversion process? Is this how your Randomizer works?

Additionally, can you talk a little more about the Refactoring. The code snippet below shows an example of how a JPG is identified in the XML using the ICN# displayed as "ICN-BIKE-XX-A010228-L-03333-00495-A-01-1" . What Refactoring mechanism do I need to use for the purpose of changing all the ICNs listed below to a single generic ICN number that ends with ZERO as shown here: "ICN-BIKE-XX-A010228-L-03333-00495-A-01-0"?

Any info you can provide will be greatly welcomed.

"ICN-BIKE-XX-A010228-L-03333-00495-A-01-1"
"ICN-BIKE-XX-A010228-L-03333-00495-A-01-2"
"ICN-BIKE-XX-A010228-L-03333-00495-A-01-3"
"ICN-BIKE-XX-A010228-L-03333-00495-A-01-4"

Code: Select all

<figure id="F0001">
<title>Removing Bike Tire</title>
<graphic infoEntityIdent="ICN-BIKE-XX-A010228-L-03333-00495-A-01-1" reproductionScale="90"/>
</figure>
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: Latin Lorem Ipsum Batch Conversion

Post by adrian_sorop »

So,
The text is replaced with "Lorem" words.
For example:
The quick brow fox jumps over the lazy dog.

becomes
Lorem dolor amet adipisicing sed eiusmod incididunt labore dolore
The XML Refactoring action is named Add/Change attribute - https://www.oxygenxml.com/doc/versions/ ... yz_bgk_54b
You can set the parameters of the action like:
image.png
image.png (34.31 KiB) Viewed 1388 times
Regards,
Adrian S
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
binar
Posts: 26
Joined: Wed Apr 10, 2019 7:43 pm

Re: Latin Lorem Ipsum Batch Conversion

Post by binar »

Adrian,
Thank you for your excellent post. I forgot to ask this question in my previous post. Nevertheless, can you please talk about how the batch operation is configured in OxygenXML Editor? As I mentioned the total count of XML files I need to process is 160 files. Therefore, I would like to avoid doing each XML file conversion manually one by one.

What OxygenXML Editor configuration parameters do I need to setup so this task is handled as a single automatic batch operation? In other words, can both the Lorem Ipsum conversion task and the Refactoring task be executed together as a single automatic batch operation? Or do they need to be run separately? If each task needs to be run separately what mechanism do I need to setup to activate automatic batch processing for the Lorem Ipsum conversion task and the Refactoring task?

Lastly, does OxygenXML Editor require I point to the S1000D schemas in order for any of this to work? Any advice you may have is welcomed.
adrian_sorop
Posts: 73
Joined: Wed Jun 22, 2016 2:48 pm

Re: Latin Lorem Ipsum Batch Conversion

Post by adrian_sorop »

Hi!
The Randomize XML Text Content action have a configuration dialog. In that dialog you can set a "scope". The scope allows you to choose the set of files whose text content will be randomized by the operation. You can select from predefined resource sets (such as the current file, your whole project, the current DITA map hierarchy for DITA projects, etc.).
https://www.oxygenxml.com/doc/versions/ ... ntent.html
Same for Add/Change attribute ; the last wizard page allows you to select the set of files that represent the input of the operation.
https://www.oxygenxml.com/doc/versions/ ... xz_bgk_54b

If all your documents are in a folder in your Project, select that folder, invoke the action and set the scope as "Selected project resources".
Lastly, does OxygenXML Editor require I point to the S1000D schemas in order for any of this to work?
No, there's no need for that.

Regards,
Adrian S
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply