XML Refactoring Tool adds xml attributes

<oXygen/> general issues.
Posts: 61
Location: San Francisco

XML Refactoring Tool adds xml attributes

Thu Jan 12, 2017 5:35 am


When I run the XSL script in the UI, the output looks and works fine. However, when I use the XML Refactoring Tool to run the script -- so that I can scale this to non-developers -- the output includes additional attributes that break other systems.

Example output after running script normally:

Code: Select all

 <topicref keyref="g_1080p" type="glossentry"/>

Example output after running the same script using the XML Refactoring Tool:

Code: Select all

<topicref keyref="g_1080p" type="glossentry" xra:oxy_AttrWS__oxy_ln_keys=" ###true" xra:oxy_AttrWS__oxy_ln_type=" ###true" xra:oxy_AttrWS__oxy_ln_href=" ###true" xra:oxy_StartTagInfo="#true" xra:oxy__attributes_order="keys type href" xra:oxy_oValue__oxy_ln_keys="g_1080p" xra:oxy_nonNormValue__oxy_ln_keys="g_1080p" xra:oxy_oValue__oxy_ln_type="glossentry" xra:oxy_nonNormValue__oxy_ln_type="glossentry" xra:oxy_oValue__oxy_ln_href="g_1080p.xml" xra:oxy_nonNormValue__oxy_ln_href="g_1080p.xml"/>

How can I stop this?

Posts: 257
Location: Craiova

Re: XML Refactoring Tool adds xml attributes

Thu Jan 12, 2017 5:55 pm


When an XSLT script is executed from the XML Refactoring tool, the XSLT transformation is executed in a safe mode. This implies the following:
  • The DOCTYPE will be preserved.
  • The DTD entities will be preserved as they are in the original document when the document is saved.
  • The attribute values will be kept in their original form without being normalized.
To achieve some of the previous goals, the XML Refactoring mechanism adds several attributes that are interpreted internally. The attributes belong to the http://www.oxygenxml.com/ns/xmlRefactoring/additional_attributes namespace. These attributes should not be taken into account when processing the input XML document since they are discarded when the transformed document is serialized.

You can read more details about these constraints in our user manual, http://oxygenxml.com/doc/versions/18.1/ ... tools.html.

Therefore, could you check if your stylesheet interact accidentally with these attributes? Maybe you copy them and somehow change their namespaces.

If you are not able to fix the problem on your side, could you send us a sample XSLT script and XML data to reproduce the problem at support@oxygenxml.com?
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest