.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::LibXSLT::Quick 3" .TH XML::LibXSLT::Quick 3 2024-09-01 "perl v5.40.0" "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::LibXSLT::Quick \- an easier to use (= "quicker") interface to XML::LibXSLT .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use XML::LibXSLT::Quick (); \& \& my $stylesheet = \& XML::LibXSLT::Quick\->new( { location => \*(Aqexample/1.xsl\*(Aq, } ); \& my $xml1_text = _utf8_slurp(\*(Aqexample/1.xml\*(Aq); \& my $out_fn = \*(Aqfoo.xml\*(Aq; \& $stylesheet\->generic_transform( \& +{ \& type => \*(Aqfile\*(Aq, \& path => $out_fn, \& }, \& $xml1_text, \& ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This is a module that wraps XML::LibXSLT with an easier to use interface. .PP It can be used to process XML documents using XSLT (Extensible Stylesheet Language Transformations) stylesheets. .SH METHODS .IX Header "METHODS" .SS "XML::LibXSLT::Quick\->new({ location=>""./xslt/my.xslt"", });" .IX Subsection "XML::LibXSLT::Quick->new({ location=>""./xslt/my.xslt"", });" TBD. .ie n .SS $obj\->\fBstylesheet()\fP .el .SS \f(CW$obj\fP\->\fBstylesheet()\fP .IX Subsection "$obj->stylesheet()" The result of \fBparse_stylesheet()\fR. .ie n .SS $obj\->\fBxml_parser()\fP .el .SS \f(CW$obj\fP\->\fBxml_parser()\fP .IX Subsection "$obj->xml_parser()" The XML::LibXML instance. .ie n .SS "$obj\->generic_transform($dest, $source)" .el .SS "\f(CW$obj\fP\->generic_transform($dest, \f(CW$source\fP)" .IX Subsection "$obj->generic_transform($dest, $source)" To be discussed. .PP See \f(CW\*(C`t/using\-quick\-wrapper.t\*(C'\fR . .PP \&\f(CW$dest\fR can be: .PP \&\f(CW\*(C`\e$my_string_var\*(C'\fR .PP \&\f(CW\*(C`{type => \*(Aqdom\*(Aq, }\*(C'\fR \- the DOM will be returned. .PP \&\f(CW\*(C`{type => \*(Aqpath\*(Aq, path => $filepath, }\*(C'\fR \- the output string will be written to \f(CW$filepath\fR . .PP \&\f(CW\*(C`{type => \*(Aqreturn\*(Aq, }\*(C'\fR \- the output string will be returned. .PP \&\f(CW$source\fR can be: .PP A string. .PP \&\f(CW\*(C`{type => \*(Aqfile\*(Aq, path => $filepath, params => +{}, }\*(C'\fR \- the file will be parsed. .PP \&\f(CW\*(C`{type => \*(Aqstring\*(Aq, string => $my_xml_string, params => +{}, }\*(C'\fR \- the string will be parsed. .ie n .SS $obj\->output_as_chars($dom) .el .SS \f(CW$obj\fP\->output_as_chars($dom) .IX Subsection "$obj->output_as_chars($dom)" .ie n .SS $obj\->transform(...) .el .SS \f(CW$obj\fP\->transform(...) .IX Subsection "$obj->transform(...)" .ie n .SS $obj\->transform_into_chars(...) .el .SS \f(CW$obj\fP\->transform_into_chars(...) .IX Subsection "$obj->transform_into_chars(...)" Delegating from \f(CW$obj\fR\->\fBstylesheet()\fR . See XML::LibXSLT . .SH "SEE ALSO" .IX Header "SEE ALSO" XML::LibXSLT::Easy by Yuval Kogman \- requires some MooseX modules. .PP XML::LibXSLT \- used as the backend of this module. .SH "COPYRIGHT & LICENSE" .IX Header "COPYRIGHT & LICENSE" \&\fBNOTE!!! :\fR this licence applies to this file alone. The blanket licence for the distribution is "same as Perl 5". .PP (I\ am not a lawyer (= "IANAL")\ / etc. ) .PP For more information, consult: .IP \(bu 4 .IP \(bu 4 .IP \(bu 4 .Sp “Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” .PP Copyright 2022 by Shlomi Fish .PP This program is distributed under the MIT / Expat License: .PP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: .PP The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. .PP THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.