Difference between revisions of "Extension:XMLTransformation"
From Biowikifarm Metawiki
(Created page with "'''Summary:''' * This extension is part of the subversion managed extensions in https://biowikifarm.net/svn. Its function is to transform given XML, RDF etc. via an XSL style...") |
m (+documentation) |
||
Line 5: | Line 5: | ||
* Andreas Plank | * Andreas Plank | ||
− | '''Description:''' | + | '''Description:''' To activate this extension, add the following line to the end of the Wiki settings file <code>LocalSettings.php</code>: |
− | # the URL of the RDF/XML resource | + | <syntaxhighlight lang="bash"> |
− | # and the Wiki page | + | require_once( "$IP/extensions/XMLTransformation/XMLTransformation.php" ); |
− | + | </syntaxhighlight> | |
+ | |||
+ | Then go to the page <code>Special:XMLTransformation</code>, here you can insert the needed resources to be transformed: | ||
+ | # the URL of the RDF/XML resource you want to transform | ||
+ | # and the xsl stylesheet that contains the rules for transformation (this must be a Wiki page, e.g.: “MediaWiki:SMWToSKOS.xsl” see an example at https://terms.tdwg.org/wiki/MediaWiki:SMWToSKOS.xsl) | ||
+ | After pressing the button [Transform] the given RDF/XML resource should be transformed accordingly. | ||
+ | |||
+ | Note: the extension gives no warnings (yet) if an error occurs during the transformation or if a resource cannot be downloaded etc.. | ||
'''Dependencies:''' | '''Dependencies:''' |
Latest revision as of 15:25, 16 December 2019
Summary:
- This extension is part of the subversion managed extensions in https://biowikifarm.net/svn. Its function is to transform given XML, RDF etc. via an XSL stylesheet instruction into a transformed output.
Author:
- Andreas Plank
Description: To activate this extension, add the following line to the end of the Wiki settings file LocalSettings.php
:
require_once( "$IP/extensions/XMLTransformation/XMLTransformation.php" );
Then go to the page Special:XMLTransformation
, here you can insert the needed resources to be transformed:
- the URL of the RDF/XML resource you want to transform
- and the xsl stylesheet that contains the rules for transformation (this must be a Wiki page, e.g.: “MediaWiki:SMWToSKOS.xsl” see an example at https://terms.tdwg.org/wiki/MediaWiki:SMWToSKOS.xsl)
After pressing the button [Transform] the given RDF/XML resource should be transformed accordingly.
Note: the extension gives no warnings (yet) if an error occurs during the transformation or if a resource cannot be downloaded etc..
Dependencies:
-
xsltproc
command line tool -
wget
command line tool - tested MediaWiki Version: 1.26.2