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

Matching the document node #130

Closed
xml-project opened this issue Jun 16, 2019 · 5 comments

Comments

@xml-project
Copy link
Contributor

commented Jun 16, 2019

While implementing some steps I observed that the current specs has a variety concerning matching the document node for "replacing steps". Here is my results:

  • "p:hash": No ruling for matching the document node.
  • "p: replace": Error XC0023
  • "p: string-replace": No ruling.
  • "p:unwrap": Error XC0023
  • "p:uuid": No Ruling.

As we need a ruling for the uncovered cases, two solutions came up to me:

  1. It is an error in these cases too.
  2. If the document node is matched, the result is a text document containing the replacing string.

Which one do you find more natural?

@gimsieke

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

I prefer creating text documents throughout

@xml-project

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2019

I prefer creating text documents throughout

Even for those, which currently supposed to raise an error?

@gimsieke

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

Yes

@ndw

This comment has been minimized.

Copy link
Collaborator

commented Jul 24, 2019

Fine by me.

@xml-project

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2019

Sorry, for the p:unwrap case, I do not see how to have the text document result requested by @gimsieke . If the document node is matched (currently an error) I would expect, that the result is a new document node having the same children as the source. So matching the document node is senseless, but that does not make it an error.
However: How to make a text document? (Mind that source doesn't accept only xml and html).
What did I miss?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.