Wiki source for FileexportActionInfo


Show raw source

=====Fileexport Action Documentation=====
//Not included in official Wikka version//

>>==See also:==
Development: FileexportAction>>This is the documentation page for the Fileexport action.::c::
===Documentation===

==Short description==
Exports a selection of wiki pages to an HTML or XML file.

==Parameters==
""<table cellspacing="0" cellpadding="2" border="1">
<thead>
<tr><th scope="col">name</th><th scope="col">type</th><th scope="col">required?</th><th scope="col">default</th><th scope="col">description</th></tr>
</thead>
<tbody>
<tr><td>type</td><td>string</td><td>optional</td><td>html</td><td>Allowed values are 'html', 'rawhtml' and 'xml'</td></tr>
<tr><td>scope</td><td>string</td><td>optional</td><td>m</td><td>Scope of export, i.e. set of pages to be exported. Allowed values are 'm' (mine=all pages owned by current user), 'o' (others=include pages owned by me+others), 'p' (public=include mine, others' and public -i.e. system- pages) and a valid page tag (export only this page) </td></tr>
<tr><td>sort</td><td>string</td><td>optional</td><td>tag</td><td>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)</td></tr>
<tr><td>opts</td><td>string</td><td>optional</td><td></td><td>Options: any combination of 'e' (embed the CSS stylesheet) and 'r' (remove external hyperlinks)</td></tr>
<tr><td>cats</td><td>string</td><td>optional</td><td></td><td>Select only pages belonging to any of the specified categories, passed as a list of Cat1, Cat2...</td></tr>
</tbody>
</table>""
==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 a table of contents. This is a convenient way to extract from a wiki a self-contained HTML file to carry around.
~~~- CSS stylesheet: it is embedded in the page if the 'e' option is selected.
~~~- external hyperlinks (i.e intra-wiki hyperlinks to non-exported pages, hyperlinks to other web sites, links to files on a shared disk): they are kept "as is" by default. They can be removed by selecting the 'r' option.
~~- RAWHTML: the selected wiki pages are merged into a single HTML file with no wrapping tags (<!DOCTYPE>, <html>, <head> and <body>) nor stylesheet (in other words, the 'e' option has no effect). This export format is a convenient way of using the wiki as an HTML editor.
~~- XML: all selected wiki pages are folded into a structured XML file. Each page is included in both a "raw" (wiki mark-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 further processing.
~~~- for the "rendered" version of each page, the 'r' option can be used as described above.
~- pages included: they are specified by combining the 'scope' parameter with 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.
~- pages sort order: it is controlled by the 'sort' parameter.

The XML file format complies with the following [[http://www.rpbourret.com/xml/xmldtd.htm | DTD]]:

%%(xml)
<!ELEMENT wikka (page*)>
<!ELEMENT page (owner, category*, title, raw_content, rendered_content, structdataitem*)>
<!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 structdataitem (#PCDATA)>
<!ATTLIST structdataitem type CDATA #REQUIRED>%%

==Usage==

%%{{fileexport [type="html"] [sort="tag"] [scope="o"] [opts="e"] [cats="CategoryWiki, CategoryUsers"]}}%%

===To-do, bugs and limitations===
++~- To-do: include [[StructDataActionInfo | structured data items]] in the XML export format++

==Author==
DomBonj

----
CategoryDocumentation
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki