Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Phrases expressions

Received: by 10.231.192.73 with SMTP id dp9mr529614ibb.16.1278517473661;
        Wed, 07 Jul 2010 08:44:33 -0700 (PDT)
X-BeenThere: cernunnos-discussion@googlegroups.com
Received: by 10.231.176.18 with SMTP id bc18ls6443494ibb.3.p; Wed, 07 Jul 2010 
	08:44:32 -0700 (PDT)
Received: by 10.229.185.1 with SMTP id cm1mr527061qcb.12.1278517472595;
        Wed, 07 Jul 2010 08:44:32 -0700 (PDT)
Received: by 10.229.185.1 with SMTP id cm1mr527060qcb.12.1278517472553;
        Wed, 07 Jul 2010 08:44:32 -0700 (PDT)
Return-Path: <arghe...@gmail.com>
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44])
        by gmr-mx.google.com with ESMTP id q8si3994990qcu.12.2010.07.07.08.44.31;
        Wed, 07 Jul 2010 08:44:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of arghe...@gmail.com designates 209.85.212.44 as permitted sender) client-ip=209.85.212.44;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of arghe...@gmail.com designates 209.85.212.44 as permitted sender) smtp.mail=arghe...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-vw0-f44.google.com with SMTP id 14so9107093vws.17
        for <cernunnos-discussion@googlegroups.com>; Wed, 07 Jul 2010 08:44:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:received:in-reply-to
         :references:date:message-id:subject:from:to:content-type
         :content-transfer-encoding;
        bh=x1gSrjpduorIRTBN6T40s2gUmX/JGtg9kBYdnA8OYK4=;
        b=x1tiZGRDXn/5CNC836OlbEQdh0IxkI6fCmUfexzQmhFMAZevXcBXJTipFXmA5pGHYx
         md9UpqvqaS9caKn2xKV2KvzJnNb1Lcl0iVsAMzttDFx93hFO8EwzobHBOGrDyM4bpM56
         G6/Mj4BB5CJ8H66TKxCrJDepgYmZPNF3LgGCs=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type:content-transfer-encoding;
        b=BEvImrA6HKuHy8gxtKT428sjbeswoF7mnSCkmJiCN+Flas4rsI6xvhUDN1FM8cP/rF
         +3Q2mo029hbmJmfQZia1UUm23cyzlbSSEDgYakqc0Im2oWsJWkF5DpqbhtQgEwI2OhS0
         ZyZrtG0yzY/r+2k3PYo5HGF+wvHYvR3JJLk2E=
MIME-Version: 1.0
Received: by 10.220.157.139 with SMTP id b11mr3506814vcx.180.1278517471279; 
	Wed, 07 Jul 2010 08:44:31 -0700 (PDT)
Received: by 10.220.181.70 with HTTP; Wed, 7 Jul 2010 08:44:30 -0700 (PDT)
In-Reply-To: <AANLkTindcB_U-UvR6zi0Hd44fs_MFXK5JtWym2fdq...@mail.gmail.com>
References: <7557b4aa-f8d0-4f59-b6c7-ed4ce893f...@k39g2000yqd.googlegroups.com>
	<AANLkTindcB_U-UvR6zi0Hd44fs_MFXK5JtWym2fdq...@mail.gmail.com>
Date: Wed, 7 Jul 2010 10:44:30 -0500
Message-ID: <AANLkTinjaazskgrQA179dbyU6iqMW18rTBph1FpmF...@mail.gmail.com>
Subject: Re: [Cernunnos] Phrases expressions
From: Andy Gherna <arghe...@gmail.com>
To: cernunnos-discussion@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 7, 2010 at 10:33 AM, Andrew Wills <wills.d...@gmail.com> wrote:
> Andy,
>
> I agree we need to provide this capability.
>
> Right now I think the only example of a Phrase that does (something
> like) this is ${attributeNode}, which takes a "key=3Dvalue" expression.
>

Right, but that's really only 1 value as it is emitted as "key=3Dvalue"
in a Document Node.

> Originally I had thought (hoped I guess) that context -- attributes on
> the stack -- could provide any additional info we needed.
>

That's how I'm implementing it now for some of our custom phrases.  It
works and it's sometimes the right thing to do.  But I have come
across a use case where you really need to express it as 2 arguments.
That said, the context is great in the cases that are already in
Cernunnos--it feels like an environment variable or a System property
and it feels right such as in <append-node>, ${parseXml()}, etc..

> Have you thought about a format for passing additional arguments? =A0I
> know ${phrase-name(arg1, ar2)} probably feels the most
> natural/familiar. =A0Is there any precedent for
> ${phrase-name(arg1)(ar2)}?
>

I've not seen any function call or markup like
${phrase-name(arg1)(arg2)}, but maybe someone on the list has.
Perhaps the implementation of Phrase should be reviewed and reworked
so that it knows how to deal with multiple arguments (such as reading
a portlet preference value using a Phrase) vs. single arguments (such
as reading SQL).  It's tricky for sure.  I'm happy to help contribute
ideas/implementations for this.  But I've come to a point where it'd
be great to have that.

--=20
Andy Gherna
arghe...@gmail.com