This plugin gives a way to pass structured variables among pages.
In a kind of clone of XML syntax, you can put values into variables and use them in other pages.

You just need to add 'jspwiki.plugin.searchPath = lessless.jspwiki' in your jspwiki.properties and put lessless.jar (and antlr.jar http://www.antlr.org/), in attachment, inside the lib directory of your wiki.



simple variable assignment and evaluation
[{LessLess

assignment : <<myVar>>25<</myVar>>\\
evaluation : <<myVar/>>
}]
assignment : 25
evaluation : 25



simple variable assignment in another page and evaluation in the current one :
[{LessLess 

<<myRemoteVar>>multi line

text variable ... <</myRemoteVar>>
}]
current page :
[{LessLess

evaluation of a remote variable : <<other_page.myRemoteVar/>>.
}]
evaluation of a remote variable : multi line

text variable ... .



example of structured variables
[{LessLess

assignment : <<element1 attribute1="attr1" value="hello">> world<</element1>>\\
evaluation : <<element1/>>, <<element1:attribute1/>>
}]
assignment : world
evaluation : hello world, attr1



example of structured nested variables
[{LessLess

assignment :
<<element1 attribute1="attr1">>
before
  <<element2 attribute2="attr2">> middle<</element2>>
after
<</element1>>
evaluation : <<element1/>>, <<element1.element2:attribute2/>>
}]
assignment :

before middle after

evaluation : before middle after , attr2



element with hidden value and attributes
[{LessLess

assignment : <<element attribute1="attr1" value="hello world"/>>\\
evaluation : <<element/>>, <<element:attribute1/>>
}]
assignment :
evaluation : hello world, attr1



combination of assignment and evaluation
[{LessLess

assignment : <<element1>>hello <</element1>>\\
assignment : <<element2>><<element1/>> world<</element2>>\\
evaluation : <<element2/>>
}]
assignment : hello
assignment : hello world
evaluation : hello world

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jar
antlr.jar 445.3 kB 1 28-Jan-2009 22:52 DuvergerP
jar
lessless.jar 30.5 kB 1 28-Jan-2009 22:51 DuvergerP
« This page (revision-5) was last changed on 22-Apr-2009 10:18 by DuvergerP