Don't get logic of namespace display in Tag Insight

Having trouble installing Oxygen? Got a bug to report? Post it all here.
shunting
Posts: 2
Joined: Tue Jun 01, 2004 7:34 pm

Don't get logic of namespace display in Tag Insight

Post by shunting »

Using Oxygen 4.0 on Windows NT with an RNC schema.

Sometimes the prefix (foo:body) displays in the Tag insight dropdown, and that's what appears in the document, which is what I want, and sometimes the namespace itself does (http://www.example.com/foo:body), which is not what I want.

Further, editing the document seems to affect what appears in the dropdown -- typing in foo:body, even though that doesn't appear in the Tag Insight dropdown, will then cause the other prefixes to appear.

I don't have reproducible behavior yet, though I've certainly been trying to create it.

If there's an explanation somewhere of how namespace display works in tag insight, that would be a helpful start.

Insight default attributes is off.

TIA.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Oxygen identifies a set of elements that should be presented by the content completion popup in the current context. Each of these elements has a namespace and a local name. The current context, among other things, defines a set of proxy namespace mappings. If there is a proxy associated with the element's namespace then we present the element as proxy:element (foo:body in your example). If there is no such prefix then oXygen will present the element in the content completion popup prefixed with the actual namespace separated by a "#" character. When selecting such an element for insertion in the document oXygen will add the element together with setting the default namespace to the element namespace (using xmlns attribute).

Best Regards,
George
shunting
Posts: 2
Joined: Tue Jun 01, 2004 7:34 pm

Post by shunting »

Thanks for answering.

What do you mean, concretely, by "there is a proxy associated with the element's namespace "?

Can you give an example using markup? Thanks.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

A proxy can be associated with a namespace using the xmlns:proxy attribute, where proxy stands for the proxy to be assigned to that namespace. For instance

Code: Select all


<p:test  xmlns:p="http://www.example.com/namespaceP"></p:test>
associates the p proxy with the http://www.example.com/namespaceP namespace. Now inside the p:test element if it is possible to enter elements from http://www.example.com/namespaceP namespace then those elements will be presented prefixed with p:. If it is possible to enter elements from other namespaces, for instance element a from http://www.example.com/namespaceA namespace then oXygen will present in the content completion list something like http://www.example.com/namespaceA#a and if that element will be selected the inseted code will look like

Code: Select all


<a xmlns="http://www.example.com/namespaceA"></a>
thus correctly setting the namespace for the inserted element.

Best Regards,
George
Post Reply