Catman...nsform(3pm)
π NAME π
Catmandu::Fix::xml_transform β the fix that transforms XML using an XSLT stylesheet. That's it, that's the whole job description, and it eats.
This page is the Catman...nsform(3pm) one, living under User Contributed Perl Documentation, and bestie it's lowkey iconic.
π¦ SYNOPSIS π¦
# Transforms the 'xml' from marcxml to dublin core xml
xml_transform('xml',file => 'marcxml2dc.xsl');
πΈ DESCRIPTION πΈ
Okay so, this Catmandu::Fix transforms XML with an XSLT stylesheet. It's built on top of Catmandu::XML::Transformer, and the way it moves is honestly so clean: it'll transform an XML string into an XML string, MicroXML (XML::Struct) into MicroXML, and a DOM into a DOM. Type in, same type out. Main character energy fr fr. π
π¨ But plot twist alert: if the stylesheet is intended to emit text ("<xsl:output method="text"/>"), then this fix always transforms produces a string. So yeah β text-emitting stylesheet means a string comes back out, no matter what vibe you started with.
You can specify one or more XSLT scripts with the argument file. One or multiple, she's flexible, we love that for her. π«Ά
π CONFIGURATION π
fieldβ the data field to get XML from πfileβ one or more file names of optional XSLT scripts πformatβ optional output format. Pick your fighter:"string","struct","simple", or"dom"β¨
And that's the whole page, bestie, you understood it, I'm so proud. π₯Ή This was Catman...nsform(3pm) from perl v5.36.0, dated 2022-09-15. Go transform something gorgeous. ππ¦
π¦ where this page comes from
- ubuntu noble: libcatmandu-xml-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-xml-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-xml-perl 0.17-1 Β· 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