Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A39B7CBE6 for ; Fri, 21 Jun 2013 17:56:21 +0000 (UTC) Received: (qmail 39635 invoked by uid 500); 21 Jun 2013 17:56:21 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 39250 invoked by uid 500); 21 Jun 2013 17:56:20 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 39229 invoked by uid 99); 21 Jun 2013 17:56:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 17:56:20 +0000 Date: Fri, 21 Jun 2013 17:56:20 +0000 (UTC) From: "Aki Yoshida (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-6004) Tokenize XML does not support self-closing XML tokens MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-6004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aki Yoshida updated CAMEL-6004: ------------------------------- Attachment: camel-6004.patch As commented in my previous reply, attached is a suggested fix that also works for empty elements. It passes the existing tokenizing tests and a few other new tests that are included in the patch file. I didn't directly change TokenXMLPairExpressionIterator but added its replacement TokenXMLExressionIterator and made ExpressionBuilder to use this new one instead. I was not sure if I should reuse TokenPairExpressionIterator by passing a dummy end pair tag and overwrite only the necessary methods, or not use it because the end-pairing logic could suggest an arbitrary start and end tag pairing which does not fit to xml tokenizing. I decided to the latter approach. We could add a neutral abstract class that has those commonly used methods and both can be extended from it. But in any case, you can see a regex-based approach to handle normal and empty xml elements. I would appreciate if you can review it. thanks. regards, aki > Tokenize XML does not support self-closing XML tokens > ----------------------------------------------------- > > Key: CAMEL-6004 > URL: https://issues.apache.org/jira/browse/CAMEL-6004 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.10.2 > Reporter: Greg Heidorn > Assignee: Willem Jiang > Priority: Minor > Fix For: Future > > Attachments: camel-6004.patch, GenericTokenizeTest.java > > > Tokenize creates non-well-formed XML when handling self-closing XML tokens. Tokenize should support parsing tokens that are either have a closing tag or are self-closing. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira