Editing Rosetta structure maps in Excel
Logical structure map XMLs in Rosetta have nested, complex structure. This makes it sometimes difficult to create and to edit them in XML, for example, to add new hierarchy levels or to correct the existing structure.
To simplify this process, I developed a tool that can transform structure map XML files into CSV and back. This allows Rosetta users to edit the structure maps in Excel and to benefit from Excel’s built-in editing and sorting functions.
Presentation in the viewer:
Presentation in XML:
Presentation in Excel:
The nested structure from the map XML is displayed in columns in the CSV with the highest level on the left and the lowest on the right. To make the CSV easier to read and to adjust, labels are only entered when opening a certain level. The example above would look like this:
This structure makes it much easier to reorder some parts or to add or correct labels like page numbering etc.
The tool is designed for Windows and runs in a dedicated frame. It supports the processing of single representations but also batch processing.
Depending on the configuration and the selected processing option, the tool
– requests structure maps from Rosetta via API (single or batch)
– converts XML to CSV
– adds columns to the CSV
– extracts new file label from former file label via regular expression
– converts adjusted CSV to valid structure map XML
– adds logical structure maps via API (when created based on existing physical structure maps)
– updates logical structure maps via API (using edited existing logical structure maps)
– has flexibility because of configuration options
– writes a log file (with debug information, when configured)
The tool can be downloaded from Github:
It contains configuration and documentation files and an executable JAR that can be used right away.
The source files can be found here, too.