Skip to content

Intented behaviour for range -> source_node #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aindlq opened this issue Aug 16, 2024 · 2 comments
Closed

Intented behaviour for range -> source_node #167

aindlq opened this issue Aug 16, 2024 · 2 comments

Comments

@aindlq
Copy link

aindlq commented Aug 16, 2024

My understanding was that when range source node doesn't equal path.source_relation then range source node should be used as xpath that will produce range nodes. Is my thinking correct?

If so then there is a bug here -

String expression = path.source_relation.relation.get(0).expression;

Currently range.source_node is simply ignored when generating range node.

I guess it should be like this:

        String expression = path.source_relation.relation.get(0).expression;
        if (range.source_node.expression.equals(expression)) {
            expression = "";
        } else {
            expression = range.source_node.expression;
        }
@ymark
Copy link
Collaborator

ymark commented Aug 20, 2024

Thanks for spotting that.
Yes, you are right (usually both source node and relation are the same).
I'll update it accordingly.

@ymark
Copy link
Collaborator

ymark commented Aug 27, 2024

Fixed and included in Version 2.2.1 (https://github.com/isl/x3ml/releases/tag/2.2.1)

@ymark ymark closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants