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 »

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 »

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: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post 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
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 »

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 »

Hmm... I'll have to check with my boss, I didn't realize that there was gating associated with updating.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post 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
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 »

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 »

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 »

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: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes being discarded

Post 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
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 »

Ok,I will do that.

Close, it is a mets file.
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Attributes being discarded

Post 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
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: Attributes being discarded

Post 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
Radu
Posts: 9053
Joined: Fri Jul 09, 2004 5:18 pm

Re: Attributes being discarded

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