Difference between revisions of "EPScript/Examples"

From EPrints Documentation
Jump to: navigation, search
m
(Added formats template)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[http://earthlygnome.ifrance.com/mp-latin/ mp3 latin pop] [http://superspounge.ifrance.com/quarto-protocollo/ quarto protocollo] [http://mike12305.ifrance.com/lib/ferro-continuo/ ferro continuo] [http://raneely.125mb.com/text/smartphone-gps.htm smartphone gps] [http://prkinardan.125mb.com/styles/kokkola.htm kokkola] [http://sylverrain.ifrance.com/data/motorola-/ motorola  v3 razor silver import] [http://raneely.125mb.com/text/nortek-bluetooth.htm nortek bluetooth dongle] [http://mcgoley.125mb.com/articles/palmare-con.htm palmare con navigatore satellitare] [http://sylverrain.ifrance.com/data/fiat-punto/ fiat punto 12 16v sporting] [http://kuzelka111.ifrance.com/lib/oo/ oo7] [http://earthlygnome.ifrance.com/testo-giuseppe/ testo giuseppe povia] [http://bemedad.125mb.com/blog/vive.htm vive] [http://earthlygnome.ifrance.com/profumo-musk/ profumo musk] [http://vanopo.ifrance.com/library/dragonstea-tin/ dragonstea tin dei] [http://earthlygnome.ifrance.com/casa-sierra/ casa sierra] [http://raneely.125mb.com/text/banner-maker.htm banner maker pro] [http://sylverrain.ifrance.com/data/mix-vibes/ mix vibes pro 4] [http://mamerium.125mb.com/macinacaffe.htm macinacaffe] [http://bemedad.125mb.com/blog/programma-per.htm programma per dj] [http://prkinardan.125mb.com/styles/pentium-prescot.htm pentium prescot] [http://mike12305.ifrance.com/lib/kirsch/ kirsch] [http://kamedcal.125mb.com/jimmy-eat.htm jimmy eat world believe in what you want] [http://vanopo.ifrance.com/library/create-your/ create your ride] [http://doloeb.125mb.com/pamela-anderson.htm pamela anderson e tommy lee film hard gr] [http://kamedcal.125mb.com/mallorca-vacanze.htm mallorca vacanze] [http://superspounge.ifrance.com/per-caso/ per caso o per azzardo] [http://kewheatl.125mb.com/library/cowboy-bebop.htm cowboy bebop vol 03] [http://madavidan.125mb.com/text/oscena.htm oscena] [http://doloeb.125mb.com/partite-calcio.htm partite calcio diretta] [http://stbrocke.125mb.com/content/toner-samsung.htm toner samsung clp500] [http://prkinardan.125mb.com/styles/microsoft-windows.htm microsoft windows xp media] [http://raneely.125mb.com/text/riassunto-oliver.htm riassunto oliver twist] [http://mike12305.ifrance.com/lib/tucano-folder/ tucano folder powerbook] [http://stbrocke.125mb.com/content/trio-bebe.htm trio bebe confort] [http://sylverrain.ifrance.com/data/nokia-i/ nokia 6230i memory card] [http://mike12305.ifrance.com/lib/renault-clio/ renault clio ice] [http://kewheatl.125mb.com/library/tv-plasma.htm tv plasma lg 42px11] [http://todkonda.ifrance.com/content/emma-chaplin/ emma chaplin free] [http://kamedcal.125mb.com/via-parini.htm via parini genova] [http://mike12305.ifrance.com/lib/auto-mini/ auto mini roma] [http://stbrocke.125mb.com/content/portatile-registratori.htm portatile registratori] [http://dragonzgrace.ifrance.com/description/donna-disponibile/ donna disponibile] [http://bemedad.125mb.com/blog/dvd-r.htm dvd r vendita] [http://todkonda.ifrance.com/content/gryphon-prelude/ gryphon prelude] [http://madavidan.125mb.com/text/inni-di.htm inni di calcio vola lazio vola] [http://mike12305.ifrance.com/lib/disne/ disne] [http://bemedad.125mb.com/blog/vigorsol.htm vigorsol] [http://kewheatl.125mb.com/library/crazy-tattoo.htm crazy tattoo] [http://raneely.125mb.com/text/moto-polizia.htm moto polizia peg perego] [http://bemedad.125mb.com/blog/nashville.htm nashville] [http://bakedsmurf.ifrance.com/description/attila-flagello/ attila flagello dio] [http://mcgoley.125mb.com/articles/ricevitore-nemerix.htm ricevitore nemerix] [http://sylverrain.ifrance.com/data/palomo/ palomo] [http://vanopo.ifrance.com/library/programmi-pe/ programmi pe rdj] [http://doloeb.125mb.com/gps-garmin.htm gps garmin legend] [http://superspounge.ifrance.com/asus-kn/ asus k8n nforce3] [http://prkinardan.125mb.com/styles/bring-the.htm bring the elements] [http://kuzelka111.ifrance.com/lib/www-canzoni/ www canzoni di leone di lernia it] [http://superspounge.ifrance.com/mercedes-slk/ mercedes slk 350] [http://superspounge.ifrance.com/scarpe-di/ scarpe di puma] [http://earthlygnome.ifrance.com/coreldraw-graphics/ coreldraw graphics suite 12] [http://kuzelka111.ifrance.com/lib/level-/ level 42 live at wembley] [http://vanopo.ifrance.com/library/http-www/ http www thanhnien com vn] [http://kewheatl.125mb.com/library/www-mia.htm www mia martini it] [http://mike12305.ifrance.com/lib/castagnaro/ castagnaro] [http://bemedad.125mb.com/blog/master-emilia.htm master emilia romagna] [http://superspounge.ifrance.com/logitech-lx/ logitech lx7] [http://stbrocke.125mb.com/content/moglie-zoccole.htm moglie zoccole] [http://sylverrain.ifrance.com/data/agri/ agri 3] [http://raneely.125mb.com/text/la-brigata.htm la brigata del fuoco] [http://madavidan.125mb.com/text/estreme.htm estreme] [http://vanopo.ifrance.com/library/munson-gorham/ munson gorham] [http://prkinardan.125mb.com/styles/waddenzee.htm waddenzee] [http://mcgoley.125mb.com/articles/spin-out.htm spin out srl] [http://mike12305.ifrance.com/lib/midi-musiani/ midi musiani] [http://sylverrain.ifrance.com/data/cartoline-di/ cartoline di napoli] [http://madavidan.125mb.com/text/mx.htm mx 310] [http://doloeb.125mb.com/tennessee-shopping.htm tennessee shopping] [http://kewheatl.125mb.com/library/code-tps.htm code tps] [http://doloeb.125mb.com/sesto-continente.htm sesto continente] [http://madavidan.125mb.com/text/sito-personale.htm sito personale] [http://superspounge.ifrance.com/livres/ livres] [http://earthlygnome.ifrance.com/filme-rita/ filme rita cadillac] [http://prkinardan.125mb.com/styles/guerlain-terracotta.htm guerlain terracotta pour homme] [http://todkonda.ifrance.com/content/mbc/ mbc 19] [http://mike12305.ifrance.com/lib/alecin/ alecin] [http://superspounge.ifrance.com/mariana/ mariana] [http://sylverrain.ifrance.com/data/the-jack/ the jack bull] [http://earthlygnome.ifrance.com/gaber-bigiotteria/ gaber bigiotteria] [http://kamedcal.125mb.com/londra-net.htm londra net] [http://prkinardan.125mb.com/styles/gatto-molto.htm gatto molto] [http://bakedsmurf.ifrance.com/description/cinquemiglia/ cinquemiglia] [http://sylverrain.ifrance.com/data/scheda-gps/ scheda gps] [http://bakedsmurf.ifrance.com/description/suzuki-samurai/ suzuki samurai 19td] [http://bemedad.125mb.com/blog/manihi.htm manihi] [http://sylverrain.ifrance.com/data/punto-grande/ punto grande] [http://vanopo.ifrance.com/library/vie-biliari/ vie biliari] [http://mamerium.125mb.com/despre-tiny.htm despre tiny] [http://kamedcal.125mb.com/phil-collins.htm phil collins] [http://stbrocke.125mb.com/content/fendi-donna.htm fendi donna] [http://kewheatl.125mb.com/library/the-corrs.htm the corrs live at the royal albert hall] [http://superspounge.ifrance.com/coordinati-tulle/ coordinati tulle] [http://stbrocke.125mb.com/content/madonna-ciccone.htm madonna ciccone] [http://doloeb.125mb.com/autoradio-per.htm autoradio per audi] [http://kewheatl.125mb.com/library/vacanze-isole.htm vacanze isole tremiti] [http://sylverrain.ifrance.com/data/teorema-di/ teorema di pitagora] [http://bakedsmurf.ifrance.com/description/www-provveditorato/ www provveditorato studi milano] [http://mamerium.125mb.com/panasonic-th.htm panasonic th 37pv500] [http://bemedad.125mb.com/blog/lollipop-you.htm lollipop you] [http://bakedsmurf.ifrance.com/description/ferrero-it/ ferrero it] [http://earthlygnome.ifrance.com/cecilio-midi/ cecilio midi] [http://mike12305.ifrance.com/lib/ballerini-traslochi/ ballerini traslochi] [http://todkonda.ifrance.com/content/ram-sodimm/ ram sodimm pc2700 ddr333] [http://sylverrain.ifrance.com/data/kit-pulizia/ kit pulizia strumenti musicali] [http://earthlygnome.ifrance.com/hotel-marina/ hotel marina in toscana a marina di mass] [http://mcgoley.125mb.com/articles/mangap.htm mangap] [http://prkinardan.125mb.com/styles/sony-vaio.htm sony vaio vgnfs215z] [http://doloeb.125mb.com/lebt-den.htm lebt den der alte holzmichel] [http://superspounge.ifrance.com/tema-di/ tema di lara] [http://mike12305.ifrance.com/lib/ricardo-cocciante/ ricardo cocciante mp3] [http://todkonda.ifrance.com/content/sibel-can/ sibel can] [http://sylverrain.ifrance.com/data/jeans-nero/ jeans nero vita bassa] [http://todkonda.ifrance.com/content/bosno-moja/ bosno moja] [http://doloeb.125mb.com/magimix.htm magimix 4100] [http://dragonzgrace.ifrance.com/description/ernesto-guevara/ ernesto guevara] [http://bemedad.125mb.com/blog/zalman-w.htm zalman 400w] [http://mike12305.ifrance.com/lib/helene-mahieu/ helene mahieu] [http://sylverrain.ifrance.com/data/expresso-love/ expresso love] [http://earthlygnome.ifrance.com/elettrocardiografo/ elettrocardiografo] [http://bakedsmurf.ifrance.com/description/pentax-reflex/ pentax reflex digitali] [http://mcgoley.125mb.com/articles/roberto-cavalli.htm roberto cavalli profumi] [http://bakedsmurf.ifrance.com/description/sfondi-samsung/ sfondi samsung sghe700] [http://sylverrain.ifrance.com/data/range-expander/ range expander] [http://earthlygnome.ifrance.com/canon-ef/ canon ef 50mm f 1 8 ii 50 1 8] [http://mike12305.ifrance.com/lib/toguro/ toguro] [http://bemedad.125mb.com/blog/brevi-gran.htm brevi gran prix 022] [http://prkinardan.125mb.com/styles/autocad-lt.htm autocad lt full italiano] [http://vanopo.ifrance.com/library/videoproiettori-hitachi/ videoproiettori hitachi svga] [http://raneely.125mb.com/text/reality-all.htm reality all estero] [http://prkinardan.125mb.com/styles/philips-hz.htm philips 100hz 32] [http://bemedad.125mb.com/blog/macchina-del.htm macchina del caffe viceversa] [http://prkinardan.125mb.com/styles/calcilutite.htm calcilutite] [http://dragonzgrace.ifrance.com/description/telecomando-lg/ telecomando lg] [http://stbrocke.125mb.com/content/fujifilm-finepix.htm fujifilm finepix a 350] [http://kuzelka111.ifrance.com/lib/monitor-lg/ monitor lg 1730s] [http://mike12305.ifrance.com/lib/done-che/ done che fanno pipi] [http://kuzelka111.ifrance.com/lib/natchez-nazione/ natchez (nazione)] [http://todkonda.ifrance.com/content/puttane-di/ puttane di agrigento] [http://kuzelka111.ifrance.com/lib/weekend-lunghi/ weekend lunghi al mare] [http://superspounge.ifrance.com/cartolin-amicizia/ cartolin amicizia] [http://todkonda.ifrance.com/content/chitarra-giapponese/ chitarra giapponese] [http://bakedsmurf.ifrance.com/description/azione-obbligazione/ azione obbligazione] [http://mike12305.ifrance.com/lib/sfondi-it/ sfondi it] [http://mamerium.125mb.com/lionelrichie.htm lionelrichie] [http://earthlygnome.ifrance.com/testi-dei/ testi dei maroon five] [http://sylverrain.ifrance.com/data/www-ilcircolo/ www ilcircolo it] [http://todkonda.ifrance.com/content/tunturi-r/ tunturi r780] [http://earthlygnome.ifrance.com/knuck-if/ knuck if you buck] [http://mike12305.ifrance.com/lib/betsimisaraka/ betsimisaraka] [http://mamerium.125mb.com/sito-amico.htm sito amico] [http://vanopo.ifrance.com/library/rotico/ rotico] [http://kuzelka111.ifrance.com/lib/gunman-series/ gunman series] [http://kewheatl.125mb.com/library/late-night.htm late night jazz] [http://mike12305.ifrance.com/lib/lexmark-p/ lexmark p315] [http://doloeb.125mb.com/se-nere.htm se nere tiziano ferro] [http://sylverrain.ifrance.com/data/la-spada/ la spada e la croce] [http://raneely.125mb.com/text/pallottola-spuntata.htm pallottola spuntata] [http://sylverrain.ifrance.com/data/attrezzatura-giardinaggio/ attrezzatura giardinaggio] [http://mamerium.125mb.com/langshan.htm langshan] [http://kewheatl.125mb.com/library/trucchi-gta.htm trucchi gta vice city] [http://mike12305.ifrance.com/lib/gold-/ gold  miner] [http://earthlygnome.ifrance.com/luo/ luo] [http://bemedad.125mb.com/blog/omologazioni-impianti.htm omologazioni impianti autotrazione] [http://sylverrain.ifrance.com/data/disegni-colorare/ disegni colorare] [http://bakedsmurf.ifrance.com/description/motodacqua/ motodacqua] [http://madavidan.125mb.com/text/x-agp.htm x800 agp 256] [http://mcgoley.125mb.com/articles/cantinero-de.htm cantinero de cuba] [http://prkinardan.125mb.com/styles/francesco-oppini.htm francesco oppini] [http://bakedsmurf.ifrance.com/description/campo-thiaroye/ campo thiaroye] [http://raneely.125mb.com/text/erboristerie-a.htm erboristerie a novara] [http://bakedsmurf.ifrance.com/description/online-il/ online il sito di gtr the ultimate racing game] [http://vanopo.ifrance.com/library/commissione-difesa/ commissione difesa] [http://vanopo.ifrance.com/library/palermo-storica/ palermo storica] [http://mcgoley.125mb.com/articles/il-destino.htm il destino ne i malavoglia] [http://bemedad.125mb.com/blog/monitor-nec.htm monitor nec] [http://bakedsmurf.ifrance.com/description/sento-le/ sento le campane] [http://dragonzgrace.ifrance.com/description/messaggi-per/ messaggi per dire grazie] [http://mamerium.125mb.com/jaguar-verona.htm jaguar verona] [http://kamedcal.125mb.com/ricetta-giappone.htm ricetta giappone] [http://sylverrain.ifrance.com/data/amore-e/ amore e pallottole] [http://todkonda.ifrance.com/content/mario-vs/ mario vs donkey kong] [http://kewheatl.125mb.com/library/stella-di.htm stella di fuoco] [http://vanopo.ifrance.com/library/bientina/ bientina] [http://madavidan.125mb.com/text/connettore-pl.htm connettore pl] [http://mamerium.125mb.com/amped-.htm amped 2 in immagini] [http://doloeb.125mb.com/maschera-africane.htm maschera africane] [http://madavidan.125mb.com/text/dragombal-z.htm dragombal z] [http://bemedad.125mb.com/blog/climatizzatore-condizionatore.htm climatizzatore condizionatore portatile] [http://stbrocke.125mb.com/content/montblanc-roller.htm montblanc roller] [http://mike12305.ifrance.com/lib/perle-miluna/ perle miluna] {{EPScript}}
+
{{formats}}
 +
 
 +
{{EPScript}}
  
 
= Examples =
 
= Examples =
  
Pluralising the editors of a book:
+
== Pluralising the editors of a book ==
 +
<source lang="xml">
 +
<if test="type = 'book' and is_set(editors)">
 +
  <print expr="editors" />, (ed<if test="length(editors) gt 1">s</if>
 +
</if>
 +
</source>
 +
 
 +
== Rendering the URL of an EPrint ==
 +
<source lang="xml">
 +
<print expr="$config{base_url}" />/<print expr="eprintid" />/
 +
</source>
  
{{codesample|
+
== Testing a boolean field ==
<pre>
+
Boolean fields can be <tt>TRUE</tt>, <tt>FALSE</tt> or <tt>NULL</tt>. Just doing a <code>test="boolean_field"</code> isn't enough. Use this:
<if test="type = 'book' and is_set(editors)">
+
<source lang="xml">
  <print expr="editors" />, (ed<if test="length(editors) gt 1">s</if>
+
<if test="boolean_field = 'TRUE'">
</if>
+
  ...
</pre>
+
</if>
}}
+
</source>

Latest revision as of 02:27, 21 February 2022

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


XML Configuration: EPScript - Control Format (EPC) - Citation - Workflow - Phrase - Template - XPAGE (static pages)


EPScript

Examples

Pluralising the editors of a book

 <if test="type = 'book' and is_set(editors)">
   <print expr="editors" />, (ed<if test="length(editors) gt 1">s</if>
 </if>

Rendering the URL of an EPrint

 <print expr="$config{base_url}" />/<print expr="eprintid" />/

Testing a boolean field

Boolean fields can be TRUE, FALSE or NULL. Just doing a test="boolean_field" isn't enough. Use this:

 <if test="boolean_field = 'TRUE'">
   ...
 </if>