Schema...leType(3pm)
β¨ Schema...leType(3pm) β¨
okay bestie, this is the manual page for XML::Validator::Schema::SimpleType π (the file itself goes by Schema...leType(3pm) in the terminal, the title bar just does that little truncation thing, she's shy π«Ά). Perl doc, user contributed, the whole vibe. let's get into it.
πΈ NAME πΈ
XML::Validator::Schema::SimpleType β simple XML Schema types. that's it, that's the name, slay π
π¦ DESCRIPTION π¦
so this is the XML Schema simple type system, fr fr. this module hands you objects and class methods to support simple types, periodt β¨
but the way that complex types are literally a whole other thing β for those you gotta go see the ModelNode class instead. not here. different module. iykyk π
π USAGE π
here's the group chat recap of how you actually use her:
# create a new anonymous type based on an existing type
my $type = $string->derive();
# create a new named type based on an existing type
my $type = $string->derive(name => 'myString');
# add a restriction
$type->restrict(enumeration => "10");
# check a value against a type
($ok, $msg) = $type->check($value);
let's break it down bestie:
my $type = $string->derive();β makes a brand new anonymous type off an existing type. no name, just vibes πmy $type = $string->derive(name => 'myString');β same energy but now she has a name, iconic β¨$type->restrict(enumeration => "10");β slaps a restriction on there. in this case anenumerationof"10"π($ok, $msg) = $type->check($value);β the vibe check π runs$valueagainst the type and hands you back$okand$msg. that's the whole moment.
and that's the page bestie, no cap, every last detail preserved π
this gem comes from the User Contributed Perl Documentation collection, built against perl v5.32.0, dated 2021-01-05 π¦ go forth and validate, you main character πΈππ
π¦ where this page comes from
- debian bookworm: libxml-validator-schema-perl 1.10-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxml-validator-schema-perl 1.10-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libxml-validator-schema-perl 1.10-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-validator-schema-perl 1.10-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-validator-schema-perl 1.10-2.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-validator-schema-perl 1.10-2.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