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

Clarify XC0023 in p:rename #559

Open
ndw opened this issue Apr 26, 2024 · 0 comments
Open

Clarify XC0023 in p:rename #559

ndw opened this issue Apr 26, 2024 · 0 comments

Comments

@ndw
Copy link
Collaborator

ndw commented Apr 26, 2024

Currently, the description of p:rename says:

It is a dynamic error (err:XC0023) if the pattern matches anything other than element, attribute or processing instruction nodes.

I think we should add:

It is a dynamic error (err:XC0023) if the pattern matches anything other than element, attribute or processing instruction nodes, or if it matches more than one attribute on a single element .

This is to cover the following error case:

         <p:rename match="@test:foo|@test:moo"
                   new-name="test:baz"
                   xmlns:test="http://test.com"/>

where the input is:

      <doc test:foo="value" test:moo="otherValue"
           xmlns:test="http://test.com"/>

I think this is an erratum. It's logically an error condition, it's just a question of what error should be raised. We could invent a new error code, but it seems so similar to the other errors that I don't think it's necessary.

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