You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Oliver Strässer (JIRA)" <ji...@apache.org> on 2009/12/15 09:06:18 UTC

[jira] Created: (CLEREZZA-29) Wish for Scala function

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ässer


can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 

if the value isn't set, the returnvalue is an "" string .

i don't want to wrote everytime the folloeing code: 
 
{if((res/DC.title).length > 0){res/dc("title")*}else {""}}
 
or : 
 
{if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}


To Functions (One for XML and one for normal String is ok)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Issue Comment Edited: (CLEREZZA-29) Wish for Scala function

Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Oli, I've now closed the issue, that means the changes are in default. I'm
also deploying the modified bundle
org.apache.clerezza:org.apache.clerezza.rdf.scala.utils, however as we
haven't yet configured the launcher to look into the new snapshot repository
just doing an update wont help unless you compiled the artifact locally.
alternatively you can wait for a new launcher to be available.

reto

On Fri, Dec 18, 2009 at 9:26 AM, Oliver Strässer <
oliver.straesser@getunik.com> wrote:

> where can I found this functions?
>
> --getunik ag-------------------------------------------
>   oliver straesser              oliver.straesser@getunik.com
>   hardturmstrasse 101    fon: +41 (0)44 388 55 88
>   ch-8005 zuerich              fax: +41 (0)44 388 55 89
>
>   --aktuelles getunik projekt-------------------------
>  Engagieren Sie sich für den Klimaschutz! http://youturn.greenpeace.ch
>
>
>  --best of swiss web awards 2009------------------
>    Gold & Silber für Connect2Earth / Bronze für WWF UK
>
> get into conversation - http://www.getunik.com
>
> *****************************************************************
> Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es
> Ihnen.
> *****************************************************************
>
>
> -----Ursprüngliche Nachricht-----
> Von: Manuel Innerhofer (JIRA) [mailto:jira@apache.org]
> Gesendet: Donnerstag, 17. Dezember 2009 18:29
> An: clerezza-dev@incubator.apache.org
> Betreff: [jira] Issue Comment Edited: (CLEREZZA-29) Wish for Scala function
>
>
>    [
> https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792015#action_12792015]
>
> Manuel Innerhofer edited comment on CLEREZZA-29 at 12/17/09 5:28 PM:
> ---------------------------------------------------------------------
>
> I reviewed it. Can be closed
>
>      was (Author: mir):
>    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ässer
> >            Assignee: Reto Bachmann-Gmür
> >            Priority: Critical
> >
> > can you provide a funtion in scala wich checks a given property, and if
> the property is set, the return value is the string representation of this
> property.
> > if the value isn't set, the returnvalue is an "" string .
> > i don't want to wrote everytime the folloeing code:
> >
> > {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
> >
> > or :
> >
> > {if((res/dc("description")).length >
> 0){XML.loadString(res/dc("description")*)}else {""}}
> > To Functions (One for XML and one for normal String is ok)
> > Better is:
> > {if((res/acp("statusTextForParticipants")).length > 0){
> >                                     try {
> >
> XML.loadString(res/acp("statusTextForParticipants")*)
> >                                     } catch {
> >                                     case e:Exception =>
> res/acp("statusTextForParticipants")*;
> >                                     }
> >                                     }else {""}}
> > or an functionm wich generates valid xml from string (escaped / not
> escaped // is an xmlliteral or not)
> > , when the string is copied from microsoft word, like this. Hard to
> explain.
> > THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE
> VALID XML CONTENT
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

AW: [jira] Issue Comment Edited: (CLEREZZA-29) Wish for Scala function

Posted by Oliver Strässer <ol...@getunik.com>.
where can I found this functions?

--getunik ag-------------------------------------------
  oliver straesser              oliver.straesser@getunik.com 
  hardturmstrasse 101    fon: +41 (0)44 388 55 88
  ch-8005 zuerich              fax: +41 (0)44 388 55 89

  --aktuelles getunik projekt-------------------------
  Engagieren Sie sich für den Klimaschutz! http://youturn.greenpeace.ch 


 --best of swiss web awards 2009------------------
   Gold & Silber für Connect2Earth / Bronze für WWF UK 

get into conversation - http://www.getunik.com

*****************************************************************
Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt es Ihnen.
*****************************************************************


-----Ursprüngliche Nachricht-----
Von: Manuel Innerhofer (JIRA) [mailto:jira@apache.org] 
Gesendet: Donnerstag, 17. Dezember 2009 18:29
An: clerezza-dev@incubator.apache.org
Betreff: [jira] Issue Comment Edited: (CLEREZZA-29) Wish for Scala function


    [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792015#action_12792015 ] 

Manuel Innerhofer edited comment on CLEREZZA-29 at 12/17/09 5:28 PM:
---------------------------------------------------------------------

I reviewed it. Can be closed

      was (Author: mir):
    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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CLEREZZA-29) Wish for Scala function

Posted by "Manuel Innerhofer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792015#action_12792015 ] 

Manuel Innerhofer edited comment on CLEREZZA-29 at 12/17/09 5:28 PM:
---------------------------------------------------------------------

I reviewed it. Can be closed

      was (Author: mir):
    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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLEREZZA-29) Wish for Scala function

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791987#action_12791987 ] 

Reto Bachmann-Gmür commented on CLEREZZA-29:
--------------------------------------------

maybe another issue could be taht XML-literals are returned as NodeSequence by the * operator, this would obsolete the XML.loadString (which doesn't work anyway as XML literals need not have a single root)

> 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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CLEREZZA-29) Wish for Scala function

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür resolved CLEREZZA-29.
----------------------------------------

    Resolution: Fixed

Implemented version in which an non-existent property appears as if empty  simple literal. I doubt that's the right place to do any xhtml validation: only xhtml literals should be integrated in xhtml output without escaping, if the output is not xhtml then invalid xml isn't a problem.

> 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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CLEREZZA-29) Wish for Scala function

Posted by "Oliver Strässer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Strässer updated CLEREZZA-29:
------------------------------------

       Priority: Critical  (was: Major)
    Description: 
can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 

if the value isn't set, the returnvalue is an "" string .

i don't want to wrote everytime the folloeing code: 
 
{if((res/DC.title).length > 0){res/dc("title")*}else {""}}
 
or : 
 
{if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}


To Functions (One for XML and one for normal String is ok)


Better is: 

{if((res/acp("statusTextForParticipants")).length > 0){

                                    try {
                                    XML.loadString(res/acp("statusTextForParticipants")*)
                                    } catch {

                                    case e:Exception => res/acp("statusTextForParticipants")*;

                                    }
                                    }else {""}}


or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
, when the string is copied from microsoft word, like this. Hard to explain. 



THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT


  was:
can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 

if the value isn't set, the returnvalue is an "" string .

i don't want to wrote everytime the folloeing code: 
 
{if((res/DC.title).length > 0){res/dc("title")*}else {""}}
 
or : 
 
{if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}


To Functions (One for XML and one for normal String is ok)


> 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ässer
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLEREZZA-29) Wish for Scala function

Posted by "Manuel Innerhofer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792015#action_12792015 ] 

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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CLEREZZA-29) Wish for Scala function

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür closed CLEREZZA-29.
--------------------------------------


> 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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CLEREZZA-29) Wish for Scala function

Posted by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLEREZZA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Reto Bachmann-Gmür reassigned CLEREZZA-29:
------------------------------------------

    Assignee: Reto Bachmann-Gmür

> 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ässer
>            Assignee: Reto Bachmann-Gmür
>            Priority: Critical
>
> can you provide a funtion in scala wich checks a given property, and if the property is set, the return value is the string representation of this property. 
> if the value isn't set, the returnvalue is an "" string .
> i don't want to wrote everytime the folloeing code: 
>  
> {if((res/DC.title).length > 0){res/dc("title")*}else {""}}
>  
> or : 
>  
> {if((res/dc("description")).length > 0){XML.loadString(res/dc("description")*)}else {""}}
> To Functions (One for XML and one for normal String is ok)
> Better is: 
> {if((res/acp("statusTextForParticipants")).length > 0){
>                                     try {
>                                     XML.loadString(res/acp("statusTextForParticipants")*)
>                                     } catch {
>                                     case e:Exception => res/acp("statusTextForParticipants")*;
>                                     }
>                                     }else {""}}
> or an functionm wich generates valid xml from string (escaped / not escaped // is an xmlliteral or not)
> , when the string is copied from microsoft word, like this. Hard to explain. 
> THIS IS VERY IMPORTANT, BECAUSE YOU CAN'T RELY  ON THAT THE USER GENERATE VALID XML CONTENT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.