XML::C...::Specs(3pm)

πŸ“¦
version 1.64 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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