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

Variable Substitution XML - XPath with namespace is not working #869

Open
sbellerwork opened this issue May 8, 2023 · 0 comments
Open
Labels

Comments

@sbellerwork
Copy link

sbellerwork commented May 8, 2023

Current Behavior

When I use the variable substitution for xml XPath like $(xml:src/test/resources/document.xml:/namspace:root/path/to/node)

with a xml file looking like

<namespace:root>
    <path>
        <to>
            <node></node>
        </to>
    </path>
</namespace:root>

I get the following error

Bad XML key format ... expected format is DocumentPath:XPath.

Which is probably originating from here apache commons-text

Expected Behavior

When I use variable substitution with a namespace, I want to be able to substitute the variable.

Steps To Reproduce

1. Create a xml file with a namespace
e.g.
<namespace:root>
    <path>
        <to>
            <node></node>
        </to>
    </path>
</namespace:root>


2. in a realm.json document use the variable substitution with the xml file and a XPath including the namespace element
e.g.
$(xml:src/test/resources/document.xml:/namspace:root/path/to/node)

Environment

  • Keycloak Version: [21]
  • keycloak-config-cli Version: [keycloak-config-cli-21.0.1.jar]
  • Java Version: [17]

Anything else?

Is there an option to use xml files with namespaces in another way?

Maybe there is an option to make the split char configurable? Could be necessary to change the definition of split char in the apache repo?

@sbellerwork sbellerwork added the bug label May 8, 2023
@Motouom Motouom moved this from Todo to Ready for Dev in os-competence-center-board Nov 28, 2024
@Motouom Motouom moved this from Ready for Dev to Todo in os-competence-center-board Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant