Refactoring: add prefix/QName

<oXygen/> general issues.
UrbanHotbed
Posts: 2
Joined: Wed Feb 17, 2021 3:01 pm

Refactoring: add prefix/QName

Post by UrbanHotbed » Wed Feb 17, 2021 3:08 pm

Hi all,

I currently have to import a large set of XML data into a mixed-namespace environment, thus using namespace prefixes is mandatory.

Unfortunately the authors of the input file obviously assumed authoring standalone information and thus simply implemented their own namespace as default.

Yes, I’m aware I could write an XSLT to do the job…

Though: Is there a built-in functionality with XML Editor that might do the job of assigning a prefix to elements and/or attributes which have none yet ?

Any hint is welocm !!

Best,
Bardo

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

Re: Refactoring: add prefix/QName

Post by Radu » Thu Feb 18, 2021 9:01 am

Hi,

If you open the XML document in Oxygen in the Text editing mode you can right click inside the root element tag name and choose "Refactoring->Rename prefix". You will have a choice to rename the prefix only on that element or on all elements in the document.

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

UrbanHotbed
Posts: 2
Joined: Wed Feb 17, 2021 3:01 pm

Re: Refactoring: add prefix/QName

Post by UrbanHotbed » Thu Feb 18, 2021 5:38 pm

Really cool.

Takes its time, but works. :-)

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

Re: Refactoring: add prefix/QName

Post by Radu » Thu Feb 18, 2021 6:15 pm

Hi,

I'm glad this works for you, I added an internal issue to look into making the action faster on large XML docs.

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

Post Reply