Little Bug in TEIP5 changeAttributeOperation?

stdu
Posts: 81
Joined: Mon Mar 05, 2012 5:23 pm

Little Bug in TEIP5 changeAttributeOperation?

Post by stdu »

I think, I found a little bug in the Java-Class:

ro.sync.ecss.extensions.commons.operations.ChangeAttributeOperation

If you set the attribute's namespace here (i.e. http://www.tei-c.org/ns/1.0), Oxygen shows up an error message:
The attribute does not have a valid xml name: ":rend"
A valid attribute name must match the standard specification. http://www.w3.org/TR/xml/#NT-Name
It's seems, that Oxygen has a problem with the "http://" in the namespace. Without this "http://", the attribut is inserted correctly with the namespace-prefix.

If you don't set the namespace, all works fine, but the attribute is in the namespace of the belonging element. That's intended in our case, so it isn't a problem in the moment.
stdu
Posts: 81
Joined: Mon Mar 05, 2012 5:23 pm

Re: Little Bug in TEIP5 changeAttributeOperation?

Post by stdu »

Annotation: Oxygen XML 14, latest version.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Little Bug in TEIP5 changeAttributeOperation?

Post by adrian »

Hello,

I have just tested this operation in v14.0 and what you're describing happens if the default namespace from the current context of the XML is set to the same namespace that you are using as argument for the operation. If you use a different namespace (even with http://) or if you manually declare a namespace prefix for that same namespace, it works fine.

e.g. In your case it fails in the context of a normal TEI P5 document

Code: Select all

<TEI xmlns="http://www.tei-c.org/ns/1.0">
...
but it works if you manually declare a namespace prefix for that namespace.

Code: Select all

<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:ns="http://www.tei-c.org/ns/1.0">
...
I'll log this situation to our issue tracking tool to be handled in a future release of Oxygen.

Regarding what you are trying to accomplish, note that the "rend" attribute from TEI is not actually in the TEI namespace (http://www.tei-c.org/ns/1.0), it's actually in "no namespace", so if you want to refer it in an operation from Oxygen, you have to leave the namespace field empty.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Little Bug in TEIP5 changeAttributeOperation?

Post by adrian »

Hi,

We have resolved this problem in the current development stream and the bugfix will be available in v14.1.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply