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 2A05610E52 for ; Wed, 11 Jun 2014 20:52:03 +0000 (UTC) Received: (qmail 59197 invoked by uid 500); 11 Jun 2014 20:52:03 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 59131 invoked by uid 500); 11 Jun 2014 20:52:02 -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 59124 invoked by uid 99); 11 Jun 2014 20:52:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2014 20:52:02 +0000 Date: Wed, 11 Jun 2014 20:52:02 +0000 (UTC) From: =?utf-8?Q?Christian_M=C3=BCller_=28JIRA=29?= To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-7492) xpath/xquery - Allow to suppress exceptions when used as predicate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7492?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1402= 8376#comment-14028376 ]=20 Christian M=C3=BCller commented on CAMEL-7492: ----------------------------------------- Why not simply: {code} /foo/bar {code} or {code} /foo/bar ... {code} ? I think it's because of the backwards compatibility, but is there a real us= e case where the user would like to receive the exception instead of true/f= alse? May be we should introduce the change in the behavior (being not backwards = compatible) but providing a better default behavior. > xpath/xquery - Allow to suppress exceptions when used as predicate > ------------------------------------------------------------------ > > Key: CAMEL-7492 > URL: https://issues.apache.org/jira/browse/CAMEL-7492 > Project: Camel > Issue Type: Improvement > Components: camel-core, camel-saxon > Reporter: Claus Ibsen > Priority: Minor > Fix For: Future > > > See > http://stackoverflow.com/questions/24124015/apache-camel-xpath-routing > If you use a content based router, and have different kind of xml coming = in, you may want to ignore any exceptions, if a < xpath > expression fails = to evaluate as the xml does not fit that format. > So if we have > {code} > /foo/bar > {code} > eg a new attribute to set a flag to ignore exceptions. Though naming is h= ard, so maybe there is a better name for the attribute. > Related is also the validate eip, but I dont think we can use that as an = expression/predicate: http://camel.apache.org/validate > Otherwise we could do something like this; which may be even better as th= en it works with any Camel expression/predicate.=20 > {code:xml} > > /foo/bar > > > ... > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)