XML::C...::Specs(3pm)
π XML::C...::Specs(3pm) π
okay bestie, welcome to the perl manual page for XML::Compile::Schema::Specs β it's a perl module doc (that's the (3pm) part, iykyk), and it's literally all about the predefined schema info. buckle up π
β¨ NAME β¨
XML::Compile::Schema::Specs β Predefined Schema Information
like. that's the whole vibe. it's the shelf where the built-in schema specs live π
πΈ SYNOPSIS πΈ
# not for end-users
use XML::Compile::Schema::Specs;
π¨ real talk: this is not for end-users. it's giving internal plumbing. you probably got here by accident and that's okay, bestie, we've all been there π«Ά
π¦ DESCRIPTION π¦
This package defines the various schema-specifications. that's it, that's the job. it's the little library that holds all the predefined knowledge about schemas so everything else can just... reference it. iconic behavior, honestly. π
π METHODS π
XML::Compile::Schema::Specs->builtInType( <$node|undef>, $expanded | <$uri,$local>, %options )
So you can call this a couple of ways, okay? You hand it either an $expanded (full) type name, or a namespace $uri plus a $local node name. Also the first arg is that <$node|undef> situation.
What you get back? A HASH stuffed with process information π β or "undef" if it's not found. no in-between, no crumbs, just the hash or nothing.
here's the options table with their defaults, bestie:
-Option/--Defaultβ yeah it's a table, deal with it πjson_friendlyβ default<false>sloppy_floatsβ default<false>sloppy_integersβ default<false>
json_friendly => BOOLEAN
The READER is slightly different here, so that the output can be passed straight on to JSON serializers without you needing to do any conversion first. β¨ And heads up: this implies "sloppy_floats". so you're getting that too whether you asked or not, no cap.
sloppy_floats => BOOLEAN
okay so the float types of XML? all quite big. they support NaN, INF, and -INF. and Perl's normal floats?? do not. so Math::BigFloat gets used instead. but β and this is the tea β that's slow. π
when you set this true, your application will crash on any value that Perl's default float doesn't understand... but it'll run much faster. so it's giving "live fast, die young" energy. choose wisely π
sloppy_integers => BOOLEAN
the <integer> types have to accept huge integers, which means they require "Math::BigInt" objects to process. but honestly? often Perl's normal signed 32bit integers suffice... which is great for performance, but not standard compliant. π so it's fast and wrong-ish, or slow and correct. the eternal struggle.
XML::Compile::Schema::Specs->predefinedSchema($uri)
Returns a HASH containing the schema information for the $uri you specified β or undef if it doesn't exist. simple. clean. no notes. π
XML::Compile::Schema::Specs->predefinedSchemas()
Returns the uri of all predefined schemas. the whole roster. the full lineup. slay. π
π SEE ALSO π
This module is part of the XML-Compile distribution, version 1.64, built on October 21, 2024.
Website: http://perl.overmeer.net/xml-compile/
π LICENSE π
Copyrights 2006-2024 by [Mark Overmeer <markov@cpan.org>]. For other contributors, see the ChangeLog. π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
and that's the whole page, bestie!! πβ¨ built for perl v5.40.0, dated 2024-10-27 β love that for us. go forth and reference your schemas responsibly π π¦π
π¦ where this page comes from
- debian trixie: libxml-compile-perl 1.64-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-compile-perl 1.64-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-compile-perl 1.64-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