Attributes being discarded

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Attributes being discarded

Post by luxlunae » Mon May 30, 2016 2:02 am

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?

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Mon May 30, 2016 2:11 am

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>

adrian
Posts: 2652
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post by adrian » Mon May 30, 2016 11:06 am

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Mon May 30, 2016 6:06 pm

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.

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Mon May 30, 2016 6:07 pm

Hmm... I'll have to check with my boss, I didn't realize that there was gating associated with updating.

adrian
Posts: 2652
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post by adrian » Mon May 30, 2016 6:43 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Mon May 30, 2016 11:58 pm

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?

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Thu Jun 02, 2016 7:48 pm

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>

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Thu Jun 02, 2016 7:53 pm

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.

adrian
Posts: 2652
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post by adrian » Thu Jun 02, 2016 8:02 pm

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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

luxlunae
Posts: 26
Joined: Wed Jun 17, 2015 10:01 pm

Re: Attributes being discarded

Post by luxlunae » Sat Jun 04, 2016 12:04 am

Ok,I will do that.

Close, it is a mets file.

Dan
Posts: 453
Joined: Mon Feb 03, 2003 10:56 am

Re: Attributes being discarded

Post by Dan » Mon Jun 06, 2016 4:50 pm

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

Dan
Posts: 453
Joined: Mon Feb 03, 2003 10:56 am

Re: Attributes being discarded

Post by Dan » Tue Jun 07, 2016 12:24 pm

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

Radu
Posts: 6983
Joined: Fri Jul 09, 2004 5:18 pm

Re: Attributes being discarded

Post by Radu » Fri Jul 01, 2016 3:04 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply