Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-58) was last changed on 03-Mar-2011 11:02 by Janne Jalkanen  

This page was created on 23-May-2006 22:17 by 84.192.36.248

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 16 changed one line
It would also allow to add subpages to JSPWiki.
It aims also to present an approach to extend JSPWiki
with support for [WikiSubPages] and [WikiFarms].
At line 27 added one line
[SandBox/w:pages/SomeSubPage] =>yield link to a subpage
At line 28 changed one line
}}}
or with a more compact convenience syntax :
{{{
At line 34 added one line
[SandBox/SomeSubPage] =>yield value of wiki variable
At line 45 added one line
[SandBox/w:pages] =>yield links to all subpages of SandBox
At line 51 changed one line
The namespace ''w;'' is preserved for the predefined wiki elements.
The namespace ''w:'' is preserved for the predefined wiki elements.
At line 64 added 2 lines
<w:pagename> ... </w:pagename>
<w:pathname> ... </w:pathname>
At line 59 removed one line
<w:pageName> ... </w:pageName>
At line 68 changed 2 lines
<w:fileName> ... </w:fileName>
<w:fileSize> ... </w:fileSize>
<w:filesize> ... </w:filesize>
<w:author> ... </w:author>
<w:filename> ... </w:filename>
<w:pathname> ... </w:pathname>
<w:created> ... </w:created>
<w:lastModified> ... </w:lastModified>
<w:versionNumber> ... </w:versionNumber>
<w:versions>
<v1> ... </v1>
<v2> ... </v2>
<v3> ... </v3>
</w:versions>
At line 89 added 4 lines
<w:pages>
<subPage1> ... </subPage1>
<subPage2> ... </subPage2>
</w:pages>
At line 91 changed one line
Shortcut syntax is defined for properties, attachments and versions.
! Overview of predefined elements inside the Wiki Metadata XML model
|| Name || Description || Type
| <w:pages> | Set of pages. Used as root element or as a collection of sub-pages | ''pages''
| <w:author> | Name of the author of a page or attachment | String
| <w:pagename> | Page Name, including punctuations | String
| <w:filename> | File Name or an attachment, including punctuations | String
| <w:pathname> | Complete path name, including names of parent pages | String
| <w:created> | Creation date of a page or attachment | Date and Time
| <w:lastModified> | Last Modification date of a page of attachment | Date and Time
| <w:versionNumber>| Version number of a page or attachment | 1..n
| <w:filesize> | Filesize (number of bytes) of an attachment | number
| <w:properties> | Set of properties, or metadata of a page or attachment | ''properties''
| <w:attachments> | Set of attachments of a page | ''attachments''
| <w:versions> | set of page or attachment versions | ''pages'' or ''attachments''
| <w:to> | Set of pages which are being referred by this page (outgoing links) | ''pages''
| <w:from> | set of pages which are referring to this page (incoming links) | ''pages''
| <w:parent> | Parent page | ''page''
! Additional notes to the Wiki Metadata XML Model
The contents of a ''page'' or ''attachment'' always refers to its current state.
The {{<w:versions>}} element provides a set of pages or attachements of
all past __and current__ versions.
All sibling ''pages'', sibling ''attachments'' or sibling ''properties'' are assumed to be unique. In other words, there can not be a page with the same name inside a single w:pages element.
The <w:from> and <w:to> are ''virtual'' elements, in the sense that they are computed on request, rather then being physically present in the document tree.
!! Wiki Link Compact Syntax
A compact convenience syntax is defined for properties, subpages, attachments and versions.
At line 155 added 3 lines
/w:pages/SandBox/w:pages/SomeSubPage/w:properties/someMetaData
=> SandBox/SomeSubPage/@someMetaData
At line 124 changed one line
XPATH evens supports string functions. Following example returns a
XPATH even supports string functions. Following example returns a
At line 149 changed 2 lines
More elaborated format string allows to reference variables inside the referenced page
or attachement.
Use the ''@-syntax'' to retrieve the value of page or attachment properties.
At line 153 changed one line
[@filesize|Sanbox/attach.png]
[./w:filesize|Sanbox/attach.png] --todo check this out
At line 155 changed one line
In case the wiki link return multiple results, the format string is iterated over each result.
Combine property values and links like this (nested brackets):
{{{
[This [.] is ranked at @ranking |Sandbox]
}}}
In case the wiki link returns multiple results, the format string is iterated over each result.
At line 158 removed one line
use {{.}} to refer to the iterated result of the wiki-path
At line 160 changed 3 lines
[* @pagename has version @liveVersion, here is the [link|.] |Sandbox/w:to]
[* ./w:pagename has version @liveVersion, here is the [link|.] |Sandbox/w:to]
At line 165 changed one line
Use page variables (prefixed with $) to replace more complex format strings.
You can use other page variables to replace more complex format strings.
At line 167 changed 2 lines
[{SET formatAuthor='Author of @pagename is @author' }]
[$formatAuthor|Sandbox/w:to]
[{SET format='* ./w:pagename has version @liveVersion, here is the [link|.]' }]
[${format} |wiki-path]
At line 170 changed one line
you can do the same with a format string from another page:
At line 172 changed 8 lines
[{SET format='* ./$pagename has version ./$liveVersion, here is the [link|.]' }]
[[{$format}]|wiki-path]
idem, with format string defined in $format of this page
[[SandBox/$format]|wiki-path]
idem, with format string defined in $format of the Main page
[[SandBox/@format]|wiki-path]
}}}
Here is an example which returns a tabular format.
By putting the format string in a separate variable, you avoid the need
to escape the vertical bar ( | ) which has a separate meaning inside a wiki link.
Obviously, you could also use the tilde ( ~ ) to escape the bars.
{{{
[{SET tableformat='| ./w:pagename | @liveVersion | [link|.]' }]
At line 181 changed 3 lines
[{| ./$pagename | ./$liveVersion | [link|.] }|wiki-path]
idem, with table header and table body as output format
[ ${tableformat} | wiki-path]
At line 242 added one line
At line 267 added 8 lines
;:Thx for the improved version -- definitely contains good ideas for improvement. I've updated the body of the doc, adding some stuff I found was missing.
** I took the assumption that a wiki variable can only appear once on a page, so no multiple occurences
** the to's and from's are computed at run time, not physically present in the tree
** all the elements starting with w: are predefined wiki-syntax elements; this allows to differentiate them from user defined metadata
** the ''versions'' grouping allows to retrieve a list of all versions of a page -- such a query would mimic the page-info section of jspwiki
--[DF|DirkFrederickx]
At line 293 added 3 lines
;: Indeed, that is exactly the idea: Trying to define a not too complex syntax, so we can replace the need of several query-kind-of-plugins. However, I think xpath may still not be powerful enough ;-) BTW, I would also categorize [InsertVersionPlugin] under overlapping plugins with this syntax. Maybe there are even more... --[DF|DirkFrederickx]
Version Date Modified Size Author Changes ... Change note
58 03-Mar-2011 11:02 25.952 kB Janne Jalkanen to previous
57 28-Feb-2011 12:32 26.856 kB illetidly to previous | to last
56 27-Feb-2011 13:51 26.206 kB trevib to previous | to last
55 27-Feb-2011 12:38 26.077 kB britneyw to previous | to last
54 05-Feb-2011 10:50 25.952 kB Harry Metske to previous | to last removed spam
53 03-Feb-2011 12:45 26.189 kB neverstoper to previous | to last
52 26-Sep-2007 23:00 25.952 kB JanneJalkanen to previous | to last
51 26-Sep-2007 01:35 25.964 kB 219.138.204.162 to previous | to last
50 12-Oct-2006 11:16 25.952 kB JanneJalkanen to previous | to last
49 10-Oct-2006 12:30 26.132 kB halloween to previous | to last remove spam
48 09-Oct-2006 15:12 25.952 kB 212.123.14.6 to previous | to last remove spam
47 09-Oct-2006 14:02 26.138 kB dresses to previous | to last
46 18-Jun-2006 11:46 25.952 kB Dirk Frederickx to previous | to last
45 27-May-2006 15:16 16.641 kB Dirk Frederickx to previous | to last
44 27-May-2006 15:16 16.641 kB Dirk Frederickx to previous | to last
43 26-May-2006 12:04 15.931 kB Rolf Schumacher to previous | to last
42 26-May-2006 12:04 16.055 kB Rolf Schumacher to previous | to last
41 26-May-2006 12:03 16.029 kB Rolf Schumacher to previous | to last
« This page (revision-58) was last changed on 03-Mar-2011 11:02 by Janne Jalkanen