Page 1 of 1

XML Refactoring introduces unwanted attributes in child nodes

Posted: Fri Jun 23, 2017 1:18 am
by kg129
I'm trying XML Refactoring with the operation "Wrap Contents of Tag". However, unwanted attributes are introduced in child nodes that are contained in the content of the tag that is being selected.

Suppose my XPath picks out some element <parent> and wraps its content with <inserted_tag> such that

<parent>
some text
<child>text</child>
</parent>

On previewing I get

<parent>
<inserted_tag>some text
<child
xmlns="zzz" xmlns:zz="zzz" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">
text</child>
</parent>

where the attributes in red are unwanted attributes. Any idea why these are introduced and how I can avoid that?

Thanks for the help.

Karan.

Re: XML Refactoring introduces unwanted attributes in child nodes

Posted: Fri Jun 23, 2017 2:26 pm
by radu_pisoi
Hi,

We are not aware of a such issue so it would be great if you could provide us additional information.

Have you used the predefined Wrap element contents operation or have you implemented a custom XML Refactoring operation?

If you are using the predefined Wrap element contents operation, could you send us a small XML sample file to reproduce it on support@oxygenxml.com?

Thank you for reporting this issue.

Re: XML Refactoring introduces unwanted attributes in child nodes

Posted: Fri Jun 23, 2017 4:12 pm
by kg129
Thanks for the follow-up. I'm using the predefined operation. I'll try and get a sample file and email it as you say. I wonder if the associated schema rules are causing Oxygen to insert those attributes.