exist
exist copied to clipboard
Fix the Node/Item XDM Relationship
Small enhancement built on https://github.com/eXist-db/exist/pull/3363
But... it changes the on-disk format of the Native Value Index (values.dbx), and so requires a major release.
@line-o I don't think that needs to be done.
It makes much more sense to have it as -1, when it is the only negative value. Comparable to ['a' , 'b'].indexOf('c')
@line-o That's one perspective... feel free to send a follow-up PR.
What is the status of the PR?
@dizzzz When you have the chance could you restart the AppVeyor CI on this PR? Thanks!
sorry...

probably if we rebase, a new build is triggered
NO_SUCH_VALUE was changed from -1 to -99 in 3102f46fd2f24282b7d27372a4a8c219eee7c01d I would like the reordering of Value types to include this to be -1 again.
I would propose to shift the current mapping of node types by one which would make the relationship quite clear as all
types that are subtypes of NODE would have a higher integer value;
public static final int NODE = 1;
public final static int ELEMENT = 2;
public final static int ATTRIBUTE = 3;
public final static int TEXT = 4;
public final static int PROCESSING_INSTRUCTION = 5;
public final static int COMMENT = 6;
public final static int DOCUMENT = 7;
I would propose to shift the current mapping of node types by one which would make the relationship quite clear as all types that are subtypes of NODE would have a higher integer value;
@line-o I am not sure if I understand what you are suggesting? At the moment in this PR I have:
public final static int NODE = 56;
public final static int ATTRIBUTE = 57;
public final static int COMMENT = 58;
public final static int DOCUMENT = 59;
public final static int ELEMENT = 60;
public final static int NAMESPACE = 61;
public final static int PROCESSING_INSTRUCTION = 62;
public final static int TEXT = 63;
It looks to me from the above that "all types that are subtypes of NODE" already "have a higher integer value" than NODE. Can you explain further what you were suggesting please?
The changes look good, from a first look. Ignore earlier comment, as it did not show the new commits at the time of writing.
@adamretter
Still wondering why -99 is so important. I will introduce a PR changing that if it is not done here.
@adamretter seem to have some license header problem, that needs to be fixed first
@adamretter there seem to be some license header problems left
I checked the unsigned binary values of
- -1 : 1111111111111111
- -99 : 1111111110011101
- -2147483648 : 10000000000000000000000000000000
rebase/merge needed
The value is a non-discussion ; it could be -42 too :-/
-1 might bee too obvious and could have a different meaning; we use symbols anyway.
Leave it as is? Need rebase though / merge conflict needs to be resolved.
We'd really have this PR in
Some test fail too..
@reinhapa Yes, I added a whole load of new tests which show existing problems in eXist-db, I have just one case left to solve and then we should pass them all. When I do I will post updates XQTS numbers to. Stay tuned...
@reinhapa Yes, I added a whole load of new tests which show existing problems in eXist-db, I have just one case left to solve and then we should pass them all. When I do I will post updates XQTS numbers to. Stay tuned...
Looking forward to it
again, I do not really care; if for debugging 99 is easier to spot in debugger, please leave it that way. I feel that it makes a good reason. I'd like to stop this discussion please.
Needed
- rebase
- reformat
- check tests
I'd like to see the PR pulled in as-is, the discussion is interesting (..) but not so important I'd say. Waste of time/energy....







