Delete Element's custom IDs

Questions about XML that are not covered by the other forums should go here.
antonio3z
Posts: 1
Joined: Tue Jan 09, 2018 12:41 pm

Delete Element's custom IDs

Post by antonio3z »

Dear Forum

I've been trying refactoring XML source code in order to delete a custom ASTORIA id which is added to each element every time a fragment is closed and reopened, which makes equations no more editable in the editor as the MathML plugin won't recognize these IDs:

Code: Select all

<mathml ast:aid="00000023WIH40139910208451GYZ">
<m:math xmlns:m="http://www.w3.org/1998/Math/MathML" ast:aid="00000023WIH4013991020A451GYZ">
<m:mrow ast:aid="00000023WIH4013991020C451GYZ">
<m:msub ast:aid="00000023WIH4013991020E451GYZ">
Is there a specific syntax to write into the refactoring tool?

Thanks for the support,

Cheers
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: Delete Element's custom IDs

Post by Radu »

Hi Antonio,

In the Oxygen Tools main menu there is an "XML Refactoring" action and you can choose there to use the pre-defined "Delete attribute". Then specify the element context in which you want to make the modification (probably mathml//* in your case) and the attribute ast:aid that you want to rename. If Oxygen complains that it does not know the "ast" XML prefix you can declare it in the Preferences->XML / XSLT-FO-XQuery / XPath page.

You can also try to use the "Find/Replace" dialog in the Text editing mode, the dialog also has an XPath which allows you to focus on a certain set of elements and it allows you to use regular expressions to find content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply