XML::G...mation(3pm)
π XML::GRDDL::Transformation π
okay bestie, so you know how some things in life are just... a transformation? no? well. this module is literally that. it's XML::GRDDL::Transformation β the whole vibe is that it represents a transformation. yes, that's the NAME. we're starting strong. periodt. β¨
πΈ DESCRIPTION πΈ
ngl, the interface is a little weird. that's it. that's the description. the original devs said it and honestly? respect. they were keeping it real. π
π Constructor π
XML::GRDDL::Transformation->new($turi, $duri, [$grddl])
okay so this is the glow-up moment β it constructs a new transformation object. slay. π
and here's what you're feeding it:
$turiβ the URI of the transformation itself. it's giving main character. β¨$duriβ the document URI. this one's doing two jobs (we love a multitasker): it's used for sending an HTTPRefererheader, and it's used for resolving relative URIs found in the document. π«Ά$grddlβ optional, and it's anXML::GRDDLobject. it gets used as a cache between requests, and also for itsuamethod. iykyk. π
π¦ Methods π¦
$transformation->uri
returns the URI of the transformation. that's it. short, sweet, iconic. π
$transformation->transform($xml)
this one transforms some XML for you β and it'll take either a well-formed XML string, or an XML::LibXML::Document. it returns a string. π
plot twist incoming: if you call it in list context, it returns a string, media type pair instead. so know which context you're in, bestie. not me getting caught out by that. π
$transformation->model($xml)
transforms some XML and then parses the result as RDF. returns an RDF::Trine::Model. chef's kiss. π₯
and the intermediate RDF format? it can be literally any format supported by RDF::RDFa::Parser or RDF::Trine::Parser, including RDF/XML, Turtle and XHTML+RDFa. obsessed with the range honestly. β¨
π SEE ALSO π
XML::GRDDL.XML::GRDDL::Transformation::XSLT_1,XML::GRDDL::Transformation::RDF_EASE.
go read those next, bestie. the lore runs deep. π
π AUTHOR π
Toby Inkster <tobyink@cpan.org>.
legend behaviour. π«Ά
β COPYRIGHT AND LICENCE β
Copyright 2008-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
so go forth and remix, bb. it's free software. π
πΈ DISCLAIMER OF WARRANTIES πΈ
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
and that's on periodt β no promises, no guarantees, no cap. π
and that's the whole page, bestie!! π β¨ this was perl v5.32.1, dated 2021-09-19 β yes she's a lil vintage but she still ate, fr fr. ππ¦π
π¦ where this page comes from
- debian bookworm: libxml-grddl-perl 0.004-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libxml-grddl-perl 0.004-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-grddl-perl 0.004-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms