Return-Path: X-Original-To: apmail-santuario-dev-archive@www.apache.org Delivered-To: apmail-santuario-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55FF473DD for ; Tue, 6 Sep 2011 20:44:58 +0000 (UTC) Received: (qmail 62036 invoked by uid 500); 6 Sep 2011 20:44:57 -0000 Delivered-To: apmail-santuario-dev-archive@santuario.apache.org Received: (qmail 61420 invoked by uid 500); 6 Sep 2011 20:44:56 -0000 Mailing-List: contact dev-help@santuario.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@santuario.apache.org Delivered-To: mailing list dev@santuario.apache.org Received: (qmail 61252 invoked by uid 99); 6 Sep 2011 20:44:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 20:44:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eric@tibco.com designates 63.100.100.142 as permitted sender) Received: from [63.100.100.142] (HELO mx1-app.tibco.com) (63.100.100.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2011 20:44:47 +0000 X-IronPort-AV: E=Sophos;i="4.68,341,1312182000"; d="scan'208";a="28865444" Received: from tibco-5.tibco.com (HELO PA-CASHUB01.na.tibco.com) ([63.100.100.5]) by mx1-app.tibco.com with ESMTP; 06 Sep 2011 13:44:19 -0700 Received: from Eric-Johnsons-MacBook-Pro.local (10.98.32.18) by PA-CASHUB01.na.tibco.com (10.106.137.46) with Microsoft SMTP Server (TLS) id 14.1.270.1; Tue, 6 Sep 2011 13:44:16 -0700 Message-ID: <4E66861F.7020506@tibco.com> Date: Tue, 6 Sep 2011 22:44:15 +0200 From: Eric Johnson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: CC: Paul Subject: Re: xpath and xmlsec expression using concat References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.98.32.18] X-TM-AS-Product-Ver: SMEX-10.0.0.1459-6.800.1017-18368.004 X-TM-AS-Result: No--6.959900-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Virus-Checked: Checked by ClamAV on apache.org Hi Paul, On 9/6/11 5:17 PM, Paul wrote: > I know I can use xmlsec to sign an xml doc with a list of xpaths such > as //aa, //bb, ... but what I like to do is sign a doc with this xpath > expression: > > concat(substring(/Record/Name/text(),1,10), substring(/Record/Address/text > (),1,20), ... ) I don't quite follow the intent of the XPath expression. Perhaps you can show a sample document, and your "expected" result? -Eric. > > When I try this expr., I get this error: > > Can not convert #STRING to a NodeList! > > Now, that makes sense, but I don't have control over the xmlsec sign method so > I'm wondering if there is another way to do this? Is there another xpath > operator to convert a string to nodelist? Or maybe there is another way to use > xmlsec? > > There is a requirement in the project I'm working on to sign just parts of the > xml doc as one big string so that's why I was trying to use the xpath concat > operator instead of signing individual elements but maybe the two are > equivalent when using concat/substring? > > > thanks, > Paul. >