Revision [16230]
This is an old revision of FileexportActionInfo made by DomBonj on 2007-02-27 17:36:47.
Fileexport Action Documentation
Not included in official Wikka versionSee also:
Development: FileexportActionDocumentation
Short description
Exports a selection of wiki pages to an HTML or XML file.Parameters
name | type | required? | default | description |
---|---|---|---|---|
type | string | optional | html | Allowed values are 'html' and 'xml' |
sort | string | optional | tag | Sort order of selected pages. Allowed values are 'tag' (sort on page tag), 'title' (sort on page title) and 'time' (sort on timestamp of last update) |
opts | string | optional | Options: any combination of 'o' (others=include pages owned by others) and 'p' (public=include public (i.e. system) pages) | |
cats | string | optional | Select only pages belonging to any of the specified categories, passed as a list of Cat1, Cat2... |
Long description
This action displays on the page an hyperlink for downloading a one-file collection of selected wiki pages. The format and the content of the exported file can be controlled as follows:- file format: it can be either of:
- HTML: all selected wiki pages are merged into a single web page including an embedded CSS style sheet and a table of contents. This is a convenient way to extract from a wiki a self-contained HTML file to carry around.
- XML: all selected wiki pages are folded into a structured XML file. Each page is included in both a "raw" (marked up as displayed by the page editor) and in a "rendered" (as displayed by the WikkaWiki engine) version. This can be a powerful way to extract wiki content in a structured fashion, e.g. for reprocessing.
- pages included: they are specified by a combination of owner (the current registered user or all users) and a (possibly empty) list of categories. Note that user access to each page is checked against its read ACL, so no unallowed content can be exported.
- page sort order: it is controlled with the 'sort' parameter.
The XML file format complies with the following DTD:
<!ELEMENT wikka (page*)>
<!ELEMENT page (owner, category*, title, raw_content, rendered_content)>
<!ATTLIST page tag ID #REQUIRED>
<!ATTLIST page lastchange CDATA #REQUIRED>
<!-- ISO-8601 YYYY-MM-DDThh:mm:ss format-->
<!ELEMENT owner (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT raw_content (#PCDATA)>
<!ELEMENT rendered_content (#PCDATA)>
<!ELEMENT page (owner, category*, title, raw_content, rendered_content)>
<!ATTLIST page tag ID #REQUIRED>
<!ATTLIST page lastchange CDATA #REQUIRED>
<!-- ISO-8601 YYYY-MM-DDThh:mm:ss format-->
<!ELEMENT owner (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT raw_content (#PCDATA)>
<!ELEMENT rendered_content (#PCDATA)>
Usage
{{fileexport [type="html"] [sort="tag"] [opts="[o][p]"] [cats="CategoryWiki, CategoryUsers"]}}
To-do, bugs and limitations
- To-do: include StructDataActionInfo structured data items in the XML export format
Author
DomBonjCategoryDocumentation