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

Make namespace remover configurable #60

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Conversation

veewee
Copy link
Owner

@veewee veewee commented Nov 5, 2023

Q A
Type feature
BC Break no
Fixed issues

Summary

This RemoveNamespaces visitor allows some additional configurations:

  • RemoveNamespaces:all(): Removes all namespaces by default.
  • RemoveNamespaces::prefixed(): Removes all namespaces with a prefix (xmlns:prefix="").
  • RemoveNamespaces::unprefixed(): Removes all namespaces without a prefix (xmlns="").
  • RemoveNamespaces::byPrefixNames(['a', 'b']): Removes all namespaces with a specific prefix.
  • RemoveNamespaces::byNamespaceURIs(['http://xxx']): Removes all namespaces with a specific namespace URI.
  • new RemoveNamespaces($yourFilter): If you want to apply a custom filter to select the namespaces you allow to be stripped.

@veewee veewee added the enhancement New feature or request label Nov 5, 2023
@veewee veewee merged commit c1978d9 into main Nov 5, 2023
20 checks passed
@veewee veewee deleted the configurable-namespace-remover branch November 9, 2023 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant