Return-Path: Delivered-To: apmail-incubator-clerezza-dev-archive@minotaur.apache.org Received: (qmail 98419 invoked from network); 17 Dec 2009 17:29:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 17:29:41 -0000 Received: (qmail 82383 invoked by uid 500); 17 Dec 2009 17:29:41 -0000 Delivered-To: apmail-incubator-clerezza-dev-archive@incubator.apache.org Received: (qmail 82281 invoked by uid 500); 17 Dec 2009 17:29:41 -0000 Mailing-List: contact clerezza-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: clerezza-dev@incubator.apache.org Delivered-To: mailing list clerezza-dev@incubator.apache.org Received: (qmail 82185 invoked by uid 99); 17 Dec 2009 17:29:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 17:29:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 17:29:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 23CF0234C498 for ; Thu, 17 Dec 2009 09:29:18 -0800 (PST) Message-ID: <1827657632.1261070958141.JavaMail.jira@brutus> Date: Thu, 17 Dec 2009 17:29:18 +0000 (UTC) From: "Manuel Innerhofer (JIRA)" To: clerezza-dev@incubator.apache.org Subject: [jira] Commented: (CLEREZZA-29) Wish for Scala function In-Reply-To: <1475592995.1260864378054.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D127= 92015#action_12792015 ]=20 Manuel Innerhofer commented on CLEREZZA-29: ------------------------------------------- review it. Can be closed > Wish for Scala function > ----------------------- > > Key: CLEREZZA-29 > URL: https://issues.apache.org/jira/browse/CLEREZZA-29 > Project: Clerezza > Issue Type: Improvement > Environment: Scala Pages > Reporter: Oliver Str=C3=A4sser > Assignee: Reto Bachmann-Gm=C3=BCr > Priority: Critical > > can you provide a funtion in scala wich checks a given property, and if t= he property is set, the return value is the string representation of this p= roperty.=20 > if the value isn't set, the returnvalue is an "" string . > i don't want to wrote everytime the folloeing code:=20 > =20 > {if((res/DC.title).length > 0){res/dc("title")*}else {""}} > =20 > or :=20 > =20 > {if((res/dc("description")).length > 0){XML.loadString(res/dc("descriptio= n")*)}else {""}} > To Functions (One for XML and one for normal String is ok) > Better is:=20 > {if((res/acp("statusTextForParticipants")).length > 0){ > try { > XML.loadString(res/acp("statusTextFor= Participants")*) > } catch { > case e:Exception =3D> res/acp("status= TextForParticipants")*; > } > }else {""}} > or an functionm wich generates valid xml from string (escaped / not escap= ed // is an xmlliteral or not) > , when the string is copied from microsoft word, like this. Hard to expla= in.=20 > THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY ON THAT THE USER GENERATE= VALID XML CONTENT --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.