xml4pmwiki allows you to transform xml data using a xsl stylesheet in a pmwiki page.
once installed, the following markup is available :
(:xml4pmwiki xml=... xsl=... options:)
xml= and xsl= can take the following forms of parameters :
- the 'Attach' form : see Uploads for the appropriate syntax
- the 'Anchor' form : see IncludeOtherPages for the appropriate syntax. For convenience, xml4pmwiki discards [@ and @] you may have inserted at the begin / end of your section for lisibility
- the 'Links' form : any Internet links like http://, ftp:// https:// or ftps://
availables options are :
+debug: display the raw result of the xml transformation in a <pre>...</pre> section
-markup: disable PmWiki Markup formatting
xslisutf8: use this option if your xsl data are already utf8 encoded. By default, xml4pmwiki considers that your xsl datas are not utf8 and then encodes them. This is a tweak for being able to store xsl stylesheet with accentued characters in a wiki page section (We cannot directly stores utf8 datas in a page, can we ?)
- other options based on the form $option=value are passed to the xsl stylesheet as xsl:param
- xml4pmwiki is designed to be used on wiki where write access is restricted to editors who know what they are doing. i.e xml4pmwiki doesn't forbid the editors to link xml or xsl data located on third party web site (external site).
- xml4pmwiki does not support http_proxy for retrieving data from external ressource
- xml4pmwiki does not support "http redirect" when linking xml/xls data over http
- xml4pmwiki uses an unstable pmwiki function :
RetrieveAuthSection(). Since the return of this function may change in a near future, double check before upgrading. I will keep an eye on this function and will adapt xml4pmwiki recipe in case of any incompatibility.
- First public release.
- Calling xslt_process() seems to reset php locales to a default value. This is a problem for internationalized wikis which may use its own locale. I added a workaround to keep the save the defined locale before calling xslt_process() and restore it after the call.
- I added an optional argument 'xslisut8' to the markup. If your xsl stylesheet data are utf8 encoded, you need to add this argument. The default behaviour is to consider that your xsl data doesn't respect xsl standard and needs to be utf8_encoded by the markup before being use for xslt.
IncludeXML : Dominique Faure original recipe. Check this one if you want more controls on security or more features.