You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Aurélien Pupier (JIRA)" <ji...@apache.org> on 2018/09/07 12:39:00 UTC

[jira] [Commented] (CAMEL-12114) Have XmlLineNumberParser respecting namespace uri

    [ https://issues.apache.org/jira/browse/CAMEL-12114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16607065#comment-16607065 ] 

Aurélien Pupier commented on CAMEL-12114:
-----------------------------------------

I cannot reopen the issue myself.
The issue is not fixed.
The CamelXmlHelper is now providing endpoints and routes when there is label for the camel namespace but the generated document by org.apache.camel.util.XmlLineNumberParser.parseXml(InputStream) is still not respecting namespace correctly. When calling org.w3c.dom.Document.getElementsByTagNameNS(String, String) it nerver return a result.
see this branch https://github.com/apupier/camel/tree/CAMEL-12735-TestShowingXmlLineNumberParserNotWorking to have a test showing the issue.

> Have XmlLineNumberParser respecting namespace uri
> -------------------------------------------------
>
>                 Key: CAMEL-12114
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12114
>             Project: Camel
>          Issue Type: Improvement
>          Components: tooling
>    Affects Versions: 2.20.1
>            Reporter: Aurelien Pupier
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.22.1, 2.23.0
>
>
> when javax.xml.parsers.DocumentBuilderFactory.setNamespaceAware(boolean) is [set to true|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L87], the namespace uris is supposed to be set on all nodes (when there is one)
> i think that it should be done [here|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L133].
> it will also avoid to have to "forcenameSpace" see [here|https://github.com/apache/camel/blob/f980e6b3d88f5ebb9e604aabc44315fa01a9e486/tooling/camel-route-parser/src/main/java/org/apache/camel/parser/helper/XmlLineNumberParser.java#L79]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)