.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "XML::XSLT 3pm" .TH XML::XSLT 3pm "2018-08-28" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XML::XSLT \- A perl module for processing XSLT .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use XML::XSLT; \& \& my $xslt = XML::XSLT\->new ($xsl, warnings => 1); \& \& $xslt\->transform ($xmlfile); \& print $xslt\->toString; \& \& $xslt\->dispose(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module implements the W3C's \s-1XSLT\s0 specification. The goal is full implementation of this spec, but we have not yet achieved that. However, it already works well. See \*(L"\s-1XML::XSLT\s0 Commands\*(R" for the current status of each command. .PP \&\s-1XML::XSLT\s0 makes use of \s-1XML::DOM\s0 and LWP::Simple, while \s-1XML::DOM\s0 uses XML::Parser. Therefore XML::Parser, \s-1XML::DOM\s0 and LWP::Simple have to be installed properly for \s-1XML::XSLT\s0 to run. .SH "Specifying Sources" .IX Header "Specifying Sources" The stylesheets and the documents may be passed as filenames, file handles regular strings, string references or DOM-trees. Functions that require sources (e.g. new), will accept either a named parameter or simply the argument. .PP Either of the following are allowed: .PP .Vb 2 \& my $xslt = XML::XSLT\->new($xsl); \& my $xslt = XML::XSLT\->new(Source => $xsl); .Ve .PP In documentation, the named parameter `Source' is always shown, but it is never required. .SS "\s-1METHODS\s0" .IX Subsection "METHODS" .ie n .IP "new(Source => $xml [, %args])" 4 .el .IP "new(Source => \f(CW$xml\fR [, \f(CW%args\fR])" 4 .IX Item "new(Source => $xml [, %args])" Returns a new \s-1XSLT\s0 parser object. Valid flags are: .RS 4 .IP "DOMparser_args" 2 .IX Item "DOMparser_args" Hashref of arguments to pass to the XML::DOM::Parser object's parse method. .IP "variables" 2 .IX Item "variables" Hashref of variables and their values for the stylesheet. .IP "base" 2 .IX Item "base" Base of \s-1URL\s0 for file inclusion. .IP "debug" 2 .IX Item "debug" Turn on debugging messages. .IP "warnings" 2 .IX Item "warnings" Turn on warning messages. .IP "indent" 2 .IX Item "indent" Starting amount of indention for debug messages. Defaults to 0. .IP "indent_incr" 2 .IX Item "indent_incr" Amount to indent each level of debug message. Defaults to 1. .RE .RS 4 .RE .ie n .IP "open_xml(Source => $xml [, %args])" 4 .el .IP "open_xml(Source => \f(CW$xml\fR [, \f(CW%args\fR])" 4 .IX Item "open_xml(Source => $xml [, %args])" Gives the \s-1XSLT\s0 object new \s-1XML\s0 to process. Returns an \s-1XML::DOM\s0 object corresponding to the \s-1XML.\s0 .RS 4 .IP "base" 4 .IX Item "base" The base \s-1URL\s0 to use for opening documents. .IP "parser_args" 4 .IX Item "parser_args" Arguments to pase to the parser. .RE .RS 4 .RE .ie n .IP "open_xsl(Source => $xml, [, %args])" 4 .el .IP "open_xsl(Source => \f(CW$xml\fR, [, \f(CW%args\fR])" 4 .IX Item "open_xsl(Source => $xml, [, %args])" Gives the \s-1XSLT\s0 object a new stylesheet to use in processing \s-1XML.\s0 Returns an \s-1XML::DOM\s0 object corresponding to the stylesheet. Any arguments present are passed to the XML::DOM::Parser. .RS 4 .IP "base" 4 .IX Item "base" The base \s-1URL\s0 to use for opening documents. .IP "parser_args" 4 .IX Item "parser_args" Arguments to pase to the parser. .RE .RS 4 .RE .IP "process(%variables)" 4 .IX Item "process(%variables)" Processes the previously loaded \s-1XML\s0 through the stylesheet using the variables set in the argument. .ie n .IP "transform(Source => $xml [, %args])" 4 .el .IP "transform(Source => \f(CW$xml\fR [, \f(CW%args\fR])" 4 .IX Item "transform(Source => $xml [, %args])" Processes the given \s-1XML\s0 through the stylesheet. Returns an \s-1XML::DOM\s0 object corresponding to the transformed \s-1XML.\s0 Any arguments present are passed to the XML::DOM::Parser. .ie n .IP "serve(Source => $xml [, %args])" 4 .el .IP "serve(Source => \f(CW$xml\fR [, \f(CW%args\fR])" 4 .IX Item "serve(Source => $xml [, %args])" Processes the given \s-1XML\s0 through the stylesheet. Returns a string containing the result. Example: .Sp .Vb 1 \& use XML::XSLT qw(serve); \& \& $xslt = XML::XSLT\->new($xsl); \& print $xslt\->serve $xml; .Ve .RS 4 .IP "http_headers" 4 .IX Item "http_headers" If true, then prepends the appropriate \s-1HTTP\s0 headers (e.g. Content-Type, Content-Length); .Sp Defaults to true. .IP "xml_declaration" 4 .IX Item "xml_declaration" If true, then the result contains the appropriate header. .Sp Defaults to true. .IP "xml_version" 4 .IX Item "xml_version" The version of the \s-1XML.\s0 .Sp Defaults to 1.0. .IP "doctype" 4 .IX Item "doctype" The type of \s-1DOCTYPE\s0 this document is. Defaults to \s-1SYSTEM.\s0 .RE .RS 4 .RE .IP "xsl_output_method" 4 .IX Item "xsl_output_method" Get or set the .Sp .Sp .Sp .Sp .Sp .Sp .Sp .Sp .Sp .Sp and combinations of these. .Sp Not supported yet: \&\- attribute 'disable\-output\-escaping' .IP "xsl:variable partial or from literal text in the stylesheet." 4 .IX Item "xsl:variable partial or from literal text in the stylesheet." .PD 0 .IP "xsl:when limited" 4 .IX Item "xsl:when limited" .PD Only inside xsl:choose. Limited test support: .Sp .Sp .Sp .Sp .Sp .Sp path is supported to the same extend as with xsl:value\-of .IP "xsl:with\-param experimental" 4 .IX Item "xsl:with-param experimental" It is currently not functioning. (or is it?) .SH "SUPPORT" .IX Header "SUPPORT" General information, bug reporting tools, the latest version, mailing lists, etc. can be found at the \s-1XML::XSLT\s0 homepage: .PP .Vb 1 \& http://xmlxslt.sourceforge.net/ .Ve .SH "DEPRECATIONS" .IX Header "DEPRECATIONS" Methods and interfaces from previous versions that are not documented in this version are deprecated. Each of these deprecations can still be used but will produce a warning when the deprecation is first used. You can use the old interfaces without warnings by passing \f(CW\*(C`new()\*(C'\fR the flag \f(CW\*(C`use_deprecated\*(C'\fR. Example: .PP .Vb 2 \& $parser = XML::XSLT\->new($xsl, "FILE", \& use_deprecated => 1); .Ve .PP The deprecated methods will disappear by the time a 1.0 release is made. .PP The deprecated methods are : .IP "output_string" 2 .IX Item "output_string" use toString instead .IP "result_string" 2 .IX Item "result_string" use toString instead .IP "output" 2 .IX Item "output" use toString instead .IP "result" 2 .IX Item "result" use toString instead .IP "result_mime_type" 2 .IX Item "result_mime_type" use media_type instead .IP "output_mime_type" 2 .IX Item "output_mime_type" use media_type instead .IP "result_tree" 2 .IX Item "result_tree" use to_dom instead .IP "output_tree" 2 .IX Item "output_tree" use to_dom instead .IP "transform_document" 2 .IX Item "transform_document" use transform instead .IP "process_project" 2 .IX Item "process_project" use process instead .IP "open_project" 2 .IX Item "open_project" use \f(CW\*(C`Source\*(C'\fR argument to \fB\f(BInew()\fB\fR and \fBtransform\fR instead. .IP "print_output" 2 .IX Item "print_output" use \fB\f(BIserve()\fB\fR instead. .SH "BUGS" .IX Header "BUGS" Yes. .SH "HISTORY" .IX Header "HISTORY" Geert Josten and Egon Willighagen developed and maintained \s-1XML::XSLT\s0 up to version 0.22. At that point, Mark Hershberger started moving the project to Sourceforge and began working on it with Bron Gondwana. .SH "LICENCE" .IX Header "LICENCE" Copyright (c) 1999 Geert Josten & Egon Willighagen. All Rights Reserved. This module is free software, and may be distributed under the same terms and conditions as Perl. .SH "AUTHORS" .IX Header "AUTHORS" Geert Josten .PP Egon Willighagen .PP Mark A. Hershberger .PP Bron Gondwana .PP Jonathan Stowe .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1XML::DOM\s0, LWP::Simple, XML::Parser