[
https://issues.apache.org/jira/browse/CAMEL-27485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27485 started by Claus Ibsen.
-------------------------------------------
> camel-support - Namespaces can be created from a string of prefix=uri
> mappings, for namespacesRef
> -------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27485
> URL: https://issues.apache.org/jira/browse/CAMEL-27485
> Project: Camel
> Issue Type: Improvement
> Components: camel-support
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> The XPath {{namespace}} of the DSL is a list of prefix/uri entries. A Kamelet
> option is a single string, so a Kamelet cannot pass a variable number of
> namespaces: xpath-filter-action supports only one prefix ({{namespacePrefix}}
> + {{namespaceUri}}).
> The XPath (and XQuery, XML tokenize) model already has {{namespacesRef}}, a
> reference to a {{org.apache.camel.support.builder.Namespaces}} bean, and the
> YAML DSL supports it. What is missing is a way to build that bean from a
> string.
> Add to {{Namespaces}} a way to create it from {{"p1=uri1,p2=uri2"}}, so a
> Kamelet (or any route) can declare the bean from a property placeholder and
> use {{namespacesRef}}. This needs no change to the model or the DSL schemas.
> Test: a YAML route with a Namespaces bean built from a string with two
> prefixes, used with namespacesRef in an xpath.
> Found while writing apache/camel-kamelets#3378 (xpath-filter-action) and
> #3379 (websocket-source/-sink).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)