namespace attribute on element insertion?

ahouser
Posts: 3
Joined: Thu Sep 08, 2016 6:30 pm

namespace attribute on element insertion?

Post by ahouser »

I'm developing a couple of frameworks for deployment with Oxygen XML Web Author. One framework is stand-alone; the other is an XHTML framework extension. The DTD is customized. I'm configuring everything except the DTD, CSS, spell-checking, and content completion (cc_config.xml) in the Oxygen desktop GUI.

One baffling item ... for many element types, the frameworks' element insertion operations will add an XHTML namespace attribute (xmlns="http://www.w3.org/1999/xhtml"). I can suppress this behavior by editing the ".frameworks" file, but the framework file is overwritten when I make any other modification (in the Oxygen GUI) to the framework.

In case it is relevant, both frameworks are triggered by a custom, non-namespaced root element.

This doesn't happen with all inserted element types, so I suspect I'm missing a setting or trigger somewhere. (Example: "table" will get the namespace attribute; "ol" will not). Can anybody enlighten me on what is driving this behavior, and where it is controlled?

Thanks in advance!

-Alan Houser
cristi_talau
Posts: 489
Joined: Thu Sep 04, 2014 4:22 pm

Re: namespace attribute on element insertion?

Post by cristi_talau »

Hello,

The XHTML framework has many actions that use InsertFragmentOperation with a fragment that contains the XHTML namespace declaration.

If the root element contains the namespace declaration for the default namespace being the XHTML namespace, then the namespace declaration is omitted from the newly inserted element since it is redundant. Otherwise, the namespace declaration is added to the inserted element.

Editing ".framework" files manually while Oxygen is running is not recommended. Oxygen will not automatically pick up any changes you make there.

Best,
Cristian
Post Reply