Little Bug in TEIP5 changeAttributeOperation?

stdu
Posts: 80

Little Bug in TEIP5 changeAttributeOperation?

Wed Sep 12, 2012 1:25 pm

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: 80

Re: Little Bug in TEIP5 changeAttributeOperation?

Wed Sep 12, 2012 1:25 pm

Annotation: Oxygen XML 14, latest version.
adrian
Posts: 2326

Re: Little Bug in TEIP5 changeAttributeOperation?

Wed Sep 12, 2012 3:20 pm

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: 2326

Re: Little Bug in TEIP5 changeAttributeOperation?

Fri Sep 21, 2012 4:19 pm

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

Return to “TEI”

Who is online

Users browsing this forum: No registered users and 0 guests