WebSource::Extract::xslt - Apply an XSL Stylesheet to the input
This flavor of the Extract operator applies an XSL stylesheet to the input an returns the transformation result.
Such an extraction operator should be described as follows :
<ws:extract type="xslt" name="opname" forward-to="ops"> <xsl:stylesheet> ... </xsl:stylesheet> </ws:extract> where the xsl prefix should be associated to the URI http://www.w3.org/1999/XSL/Transform
The module implements extra pratical XSLT extension functions These can be used by delaring a prefix for theses extensions whose namespace is http://wwwsource.free.fr/ns/websource/xslt-ext and declaring that this prefix is an extension prefix. For example:
http://wwwsource.free.fr/ns/websource/xslt-ext
<xsl:stylesheet xmlns:wsx="http://wwwsource.free.fr/ns/websource/xslt-ext" extension-element-prefixes="wsx" > ... </xsl:stylesheet>
Extension function to reformat dates {http://wwwsource.free.fr/ns/websource/xslt-ext}reformat-date( date, targetTemplate, sourceLanguage? )
Extension function to do a string replacement using a perl regular expression {http://wwwsource.free.fr/ns/websource/xslt-ext}string-replace(regexp, replacement, data)
Extension function parse-encoded which parses an encoded XML string an returns a cleaned-up version {http://wwwsource.free.fr/ns/websource/xslt-ext}html-lint
WebSource
To install WebSource, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebSource
CPAN shell
perl -MCPAN -e shell install WebSource
For more information on module installation, please visit the detailed CPAN module installation guide.