camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (JIRA)" <>
Subject [jira] [Updated] (CAMEL-6004) Tokenize XML does not support self-closing XML tokens
Date Fri, 21 Jun 2013 17:56:20 GMT


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.
regards, aki

> Tokenize XML does not support self-closing XML tokens
> -----------------------------------------------------
>                 Key: CAMEL-6004
>                 URL:
>             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,
> 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:

View raw message