Page 1 of 1

Attributes being discarded

Posted: Mon May 30, 2016 2:02 am
by luxlunae
I'm not sure what context this is happening but I sometimes go to push updates and see that the type attributes have been discarded from a few or many of my nodes.

It might occur more often when I'm using outline view or author view?

Re: Attributes being discarded

Posted: Mon May 30, 2016 2:11 am
by luxlunae

Code: Select all

<relatedItem type="constituent" ID="c016">
turns to

Code: Select all

<relatedItem  ID="c016">

Code: Select all

<name type="personal">
turns to

Code: Select all

<name>

Re: Attributes being discarded

Posted: Mon May 30, 2016 11:06 am
by adrian
Hi,

Could you please clarify what operation are you performing in oxygen when that happens?

Also, what version and build of Oxygen are you using (see Help > About)?

Regards,
Adrian

Re: Attributes being discarded

Posted: Mon May 30, 2016 6:06 pm
by luxlunae
I'm afraid I don't know what actually causes it, I never notice it (in these enormous files) unless I happen to see it in the github change log.

In general I switch between normal and author mode, and I do a lot of searches in xpath.

For the most recent egregious example I also rearranged nodes by dragging them from outline view.


I'm using: <oXygen/> XML Editor 16.1, build 2015040615

but I will update later today, I hadn't thought to do that.

Re: Attributes being discarded

Posted: Mon May 30, 2016 6:07 pm
by luxlunae
Hmm... I'll have to check with my boss, I didn't realize that there was gating associated with updating.

Re: Attributes being discarded

Posted: Mon May 30, 2016 6:43 pm
by adrian
Hi,

From what you're describing the problem seems to be with the @type attribute in specific.
It's unlikely that Oxygen would randomly drop a specific attribute during Outline or Author operations. There may be an explicit action that you perform that does this.
If you're using a CMS to store the XML, check if it stores the file in its original form, or if it maybe alters (filters) it when you save/commit/push it. If you're just using Git, this is unlikely to be the cause.

If you sometimes use XPath that matches attributes (@type in specific), it's easy to make a mistake and accidentally remove the content (actual attribute) rather than the XPath result entry from the results panel (list of results).
e.g. Clicking on the result entry from the list selects the entry. Double clicking a result entry selects the content and gives focus to the editor. Pressing the Delete key removes whatever is selected and focused.

Regards,
Adrian

Re: Attributes being discarded

Posted: Mon May 30, 2016 11:58 pm
by luxlunae
That is very interesting to know, (that you can delete that way, I didn't know) but I don't generally search on type (because all of our related items are the same type, it isn't useful information). If it was deleting IDs that explanation might make more sense.

I use github through the windows application SourceTree. have you ever heard of any problems with sourcetree?

Re: Attributes being discarded

Posted: Thu Jun 02, 2016 7:48 pm
by luxlunae
This issue is still occurring with version 18.

It seems to happen when I change values from Author mode.

When I use author mode to change "S" to "V.S.", consistently the types are being stripped out of both the name and the related item (the grandparent and great grandparent elements).

Please advise:

Code: Select all

<relatedItem type="constituent" ID="c009">
<titleInfo lang="ger">
<title>RUDOLF VON ALT</title>
</titleInfo>
<name type="personal">
<displayForm>S</displayForm>
<role>
<roleTerm type="code" authority="marcrelator">cre</roleTerm>
</role>
</name>
Result:

Code: Select all

<relatedItem ID="c009">
<titleInfo lang="ger">
<title>RUDOLF VON ALT</title>
</titleInfo>
<name>
<displayForm>V.S.</displayForm>
<role>
<roleTerm type="code" authority="marcrelator">cre</roleTerm>
</role>
</name>

Re: Attributes being discarded

Posted: Thu Jun 02, 2016 7:53 pm
by luxlunae
When I press undo to undo it, the entire node tree (from related item on down, including child related items) is suddenly selected, if that hint helps anything.

Re: Attributes being discarded

Posted: Thu Jun 02, 2016 8:02 pm
by adrian
Hi,

What type of document is this? Is it TEI?

Could you please send us a sample file that reproduces the problem to support@oxygenxml.com ?

Regards,
Adrian

Re: Attributes being discarded

Posted: Sat Jun 04, 2016 12:04 am
by luxlunae
Ok,I will do that.

Close, it is a mets file.

Re: Attributes being discarded

Posted: Mon Jun 06, 2016 4:50 pm
by Dan
Thank you for the samples! We reproduced the problem, and we are in the process of fixing it. I will come back with details.

Regards,
Dan Caprioara

Re: Attributes being discarded

Posted: Tue Jun 07, 2016 12:24 pm
by Dan
The problem was caused by the "xlink:type" attribute (having a fixed value set in the associated XML Schema) conflicting with the specified "type" attribute from the XML document. The problem is now resolved and the fix will enter the next hot fixes build. I expect this to be available at the end of this week.

Many regards,
Dan

Re: Attributes being discarded

Posted: Fri Jul 01, 2016 3:04 pm
by Radu
Hi,

The newest Oxygen 18.0 bug fix release should have a fix for this problem:

https://www.oxygenxml.com/build_history.html#2016062718

Regards,
Radu