Skip to content
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

How to handle duplicate nodes being added through a snippet? #2

Open
aljoshakoecher opened this issue Jul 7, 2022 · 0 comments
Open

Comments

@aljoshakoecher
Copy link
Member

aljoshakoecher commented Jul 7, 2022

We need to think about the way we handle snippets which already exist.
Let's say we have this part in an existing XML document:

<person id="1">
  <name>Peter Griffin</name>
</person>

Let's assume a mapping specifies a container person[id=${?id}]] and a snippet <name>${?name}</name>. With a variable binding of ?id = 1; ?name = "Peter Griffin", we would add a duplicate name node into the person node with id 1.

Is this a good way to handle it? Or should this be skipped to not create duplicates?
I think there should be an option to configure this behavior.

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

1 participant