Current File : //home/strato/chroot/opt/RZperl536/man/man3/XML::LibXSLT::Quick.3 |
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
.\"
.\" 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
..
.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 "2023-02-10" "perl v5.36.1" "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 \s-1XML\s0 documents using
\&\s-1XSLT\s0 (Extensible Stylesheet Language Transformations) <https://en.wikipedia.org/wiki/XSLT>
stylesheets.
.SH "METHODS"
.IX Header "METHODS"
.ie n .SS "XML::LibXSLT::Quick\->new({ location=>""./xslt/my.xslt"", });"
.el .SS "XML::LibXSLT::Quick\->new({ location=>``./xslt/my.xslt'', });"
.IX Subsection "XML::LibXSLT::Quick->new({ location=>./xslt/my.xslt, });"
\&\s-1TBD.\s0
.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 \s-1DOM\s0 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"
\&\fB\s-1NOTE\s0!!! :\fR this licence applies to this file alone. The blanket licence
for the distribution is \*(L"same as Perl 5\*(R".
.PP
(I am not a lawyer (= \*(L"\s-1IANAL\*(R"\s0) / etc. )
.PP
For more information, consult:
.IP "\(bu" 4
<https://www.shlomifish.org/philosophy/computers/open\-source/foss\-licences\-wars/rev2/#which\-licence\-same\-as\-perl>
.IP "\(bu" 4
<https://github.com/shlomif/perl\-XML\-LibXSLT/issues/5>
.IP "\(bu" 4
<https://en.wikiquote.org/w/index.php?title=Rick_Cook&oldid=3060266>
.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 \s-1MIT /\s0 Expat License:
<http://www.opensource.org/licenses/mit\-license.php>
.PP
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the \*(L"Software\*(R"), 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
\&\s-1THE SOFTWARE IS PROVIDED \*(L"AS IS\*(R", 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.\s0