I am trying to fix an openoffice document by replacing certain text:h tags with text:p tags.
The document I try to fix is
and can be just unzipped. The file content.xml is the one I'm working on, after xmllint --format'ing it.
So far I tried to use
$ xmlstarlet ed --rename 'text:h[@text:style-name="P39" AND @text:level="1"]' -v 'text:p' content.xml > fixed.xml
$ xmlstarlet ed --rename 'text:h' -v 'text:p' content.xml > fixed.xml
but after running that, content.xml and fixed.xml are the same. That's with xmlstarlet 1.0.5.
So my question is: What am I doing wrong? What's the correct way to rename that tag?
Log in to post a comment.