Page 1 of 1

form controls using attribute @xml:id

Posted: Thu Jul 17, 2014 1:54 am
by emmam
Hi
I want to display an attribute @xml:id in a form control.
How should I deal with the xml namespace ?

My css code :
element {
oxy_combobox(edit, "@xml:id", columns, 20);
}
it displays an empty combobox...

Thanks for the help !

Best

Emmanuelle

Re: form controls using attribute @xml:id

Posted: Thu Jul 17, 2014 2:43 pm
by alex_jitianu
Hello,

First of all it's important to know what Oxygen version are you using? Prior to version 15.2, property edit was not viewed as a qualified name. If the attribute has a namespace, you had to give the name or QName of the attribute just like it appeared in the XML instance. In order for the CSS snippet you provided to work, the XML had to be :

Code: Select all

<element xml:id="id"/>
. If you are using a different prefix for the attribute in the XML document, it wont work. Can you please verify if this is the situation you are facing?

Starting with version 15.2 the value of property edit is treated as a QName and it is resolved using the namespace context from the CSS. So you must have a namespace declaration for prefix xml:

Code: Select all

@namespace xml "http://www.w3.org/XML/1998/namespace";
element {
oxy_combobox(edit, "@xml:id", columns, 20);
}
I've tested in a TEI P5 document both with Oxygen versions 14.2 and 16.0. The attribute was edited as expected in both cases (with the aforementioned details/restrictions). Perhaps you can send us some sample files on our support list so that we can reproduce the issue.

Best regards,
Alex

Re: form controls using attribute @xml:id

Posted: Fri Jul 18, 2014 1:18 am
by emmam
Hi
I'm using Oxygen editor 16. Works fine with the namespace context from the CSS (that's what was missing in my files). Do you still want me to send test files ?
thanks a lot
Best
emmanuelle

Re: form controls using attribute @xml:id

Posted: Fri Jul 18, 2014 8:45 am
by alex_jitianu
Hello,

I don't think the sample files are necessary anymore. I was asking them in the event that none of suggestions helped...

Best regards,
Alex