| 1 | 10 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 10 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 10 | ▶ | no warnings qw(uninitialized); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 10 | ▶ | use XML::Pastor::SimpleType; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 10 | ▶ | use XML::Pastor::Builtin::List; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 10 | ▶ | use XML::Pastor::Builtin::Scalar; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 10 | ▶ | use XML::Pastor::Builtin::Numeric; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 10 | ▶ | use XML::Pastor::Builtin::Union; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 10 | ▶ | use XML::Pastor::Builtin::base64Binary; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 10 | ▶ | use XML::Pastor::Builtin::boolean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 10 | ▶ | use XML::Pastor::Builtin::date; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 10 | ▶ | use XML::Pastor::Builtin::dateTime; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 10 | ▶ | use XML::Pastor::Builtin::hexBinary; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | #====================================================================== | ||
| 19 | package XML::Pastor::Builtin::string; | ||
| 20 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 21 | |||
| 22 | |||
| 23 | 10 | XML::Pastor::Builtin::string->XmlSchemaType( bless( { | |
| 24 | 'class' => 'XML::Pastor::Builtin::string', | ||
| 25 | 'contentType' => 'simple', | ||
| 26 | 'derivedBy' => 'restriction', | ||
| 27 | 'name' => 'string|http://www.w3.org/2001/XMLSchema', | ||
| 28 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 29 | |||
| 30 | #====================================================================== | ||
| 31 | package XML::Pastor::Builtin::token; | ||
| 32 | 10 | our @ISA = qw(XML::Pastor::Builtin::string); | |
| 33 | |||
| 34 | 10 | XML::Pastor::Builtin::token->XmlSchemaType( bless( { | |
| 35 | 'class' => 'XML::Pastor::Builtin::token', | ||
| 36 | 'contentType' => 'simple', | ||
| 37 | 'derivedBy' => 'restriction', | ||
| 38 | 'name' => 'token|http://www.w3.org/2001/XMLSchema', | ||
| 39 | 'whiteSpace' => 'collapse', | ||
| 40 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 41 | |||
| 42 | |||
| 43 | #====================================================================== | ||
| 44 | package XML::Pastor::Builtin::integer; | ||
| 45 | 10 | our @ISA = qw(XML::Pastor::Builtin::Numeric); | |
| 46 | |||
| 47 | 10 | XML::Pastor::Builtin::integer->XmlSchemaType( bless( { | |
| 48 | 'class' => 'XML::Pastor::Builtin::integer', | ||
| 49 | 'contentType' => 'simple', | ||
| 50 | 'derivedBy' => 'restriction', | ||
| 51 | 'name' => 'integer|http://www.w3.org/2001/XMLSchema', | ||
| 52 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 53 | |||
| 54 | |||
| 55 | #====================================================================== | ||
| 56 | package XML::Pastor::Builtin::nonNegativeInteger; | ||
| 57 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 58 | |||
| 59 | 10 | XML::Pastor::Builtin::nonNegativeInteger->XmlSchemaType( bless( { | |
| 60 | 'class' => 'XML::Pastor::Builtin::nonNegativeInteger', | ||
| 61 | 'contentType' => 'simple', | ||
| 62 | 'derivedBy' => 'restriction', | ||
| 63 | 'minInclusive' => 0, | ||
| 64 | 'name' => 'nonNegativeInteger|http://www.w3.org/2001/XMLSchema', | ||
| 65 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 66 | |||
| 67 | |||
| 68 | #====================================================================== | ||
| 69 | package XML::Pastor::Builtin::nonPositiveInteger; | ||
| 70 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 71 | |||
| 72 | 10 | XML::Pastor::Builtin::nonPositiveInteger->XmlSchemaType( bless( { | |
| 73 | 'class' => 'XML::Pastor::Builtin::nonPositiveInteger', | ||
| 74 | 'contentType' => 'simple', | ||
| 75 | 'derivedBy' => 'restriction', | ||
| 76 | 'maxInclusive' => 0, | ||
| 77 | 'name' => 'nonPositiveInteger|http://www.w3.org/2001/XMLSchema', | ||
| 78 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 79 | |||
| 80 | |||
| 81 | #====================================================================== | ||
| 82 | package XML::Pastor::Builtin::anySimpleType; | ||
| 83 | 10 | our @ISA = qw(XML::Pastor::Builtin::SimpleType); | |
| 84 | |||
| 85 | 10 | XML::Pastor::Builtin::anySimpleType->XmlSchemaType( bless( { | |
| 86 | 'class' => 'XML::Pastor::Builtin::anySimpleType', | ||
| 87 | 'contentType' => 'simple', | ||
| 88 | 'derivedBy' => 'restriction', | ||
| 89 | 'name' => 'anySimpleType|http://www.w3.org/2001/XMLSchema', | ||
| 90 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | #====================================================================== | ||
| 95 | package XML::Pastor::Builtin::anyURI; | ||
| 96 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 97 | |||
| 98 | 10 | XML::Pastor::Builtin::anyURI->XmlSchemaType( bless( { | |
| 99 | 'class' => 'XML::Pastor::Builtin::anyURI', | ||
| 100 | 'contentType' => 'simple', | ||
| 101 | 'derivedBy' => 'restriction', | ||
| 102 | 'name' => 'anyURI|http://www.w3.org/2001/XMLSchema', | ||
| 103 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 104 | |||
| 105 | |||
| 106 | #====================================================================== | ||
| 107 | package XML::Pastor::Builtin::byte; | ||
| 108 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 109 | |||
| 110 | 10 | XML::Pastor::Builtin::byte->XmlSchemaType( bless( { | |
| 111 | 'class' => 'XML::Pastor::Builtin::byte', | ||
| 112 | 'contentType' => 'simple', | ||
| 113 | 'derivedBy' => 'restriction', | ||
| 114 | 'maxInclusive' => 127, | ||
| 115 | 'minInclusive' => -128, | ||
| 116 | 'name' => 'byte|http://www.w3.org/2001/XMLSchema', | ||
| 117 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | |||
| 122 | |||
| 123 | #====================================================================== | ||
| 124 | package XML::Pastor::Builtin::decimal; | ||
| 125 | 10 | our @ISA = qw(XML::Pastor::Builtin::Numeric); | |
| 126 | |||
| 127 | 10 | XML::Pastor::Builtin::decimal->XmlSchemaType( bless( { | |
| 128 | 'class' => 'XML::Pastor::Builtin::decimal', | ||
| 129 | 'contentType' => 'simple', | ||
| 130 | 'derivedBy' => 'restriction', | ||
| 131 | 'name' => 'decimal|http://www.w3.org/2001/XMLSchema', | ||
| 132 | 'regex'=> qr/^[+-]?\d+(?:\.\d+)?$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 133 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 134 | |||
| 135 | |||
| 136 | |||
| 137 | #====================================================================== | ||
| 138 | package XML::Pastor::Builtin::double; | ||
| 139 | 10 | our @ISA = qw(XML::Pastor::Builtin::Numeric); | |
| 140 | |||
| 141 | 10 | XML::Pastor::Builtin::double->XmlSchemaType( bless( { | |
| 142 | 'class' => 'XML::Pastor::Builtin::double', | ||
| 143 | 'contentType' => 'simple', | ||
| 144 | 'derivedBy' => 'restriction', | ||
| 145 | 'name' => 'double|http://www.w3.org/2001/XMLSchema', | ||
| 146 | |||
| 147 | # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 148 | 'regex' => qr/^[+-]?(?:(?:INF)|(?:NaN)|(?:\d+(?:\.\d+)?)(?:[eE][+-]?\d+)?)$/, | ||
| 149 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | #====================================================================== | ||
| 154 | package XML::Pastor::Builtin::duration; | ||
| 155 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 156 | |||
| 157 | 10 | XML::Pastor::Builtin::duration->XmlSchemaType( bless( { | |
| 158 | 'class' => 'XML::Pastor::Builtin::duration', | ||
| 159 | 'contentType' => 'simple', | ||
| 160 | 'derivedBy' => 'restriction', | ||
| 161 | 'name' => 'duration|http://www.w3.org/2001/XMLSchema', | ||
| 162 | |||
| 163 | # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar who thanks to perlmonk Abigail-II | ||
| 164 | 'regex' => qr /^-? # Optional leading minus. | ||
| 165 | P # Required. | ||
| 166 | (?=[T\d]) # Duration cannot be empty. | ||
| 167 | (?:(?!-) \d+ Y)? # Non-negative integer, Y (optional) | ||
| 168 | (?:(?!-) \d+ M)? # Non-negative integer, M (optional) | ||
| 169 | (?:(?!-) \d+ D)? # Non-negative integer, D (optional) | ||
| 170 | ( | ||
| 171 | (?:T (?=\d) # T, must be followed by a digit. | ||
| 172 | (?:(?!-) \d+ H)? # Non-negative integer, H (optional) | ||
| 173 | (?:(?!-) \d+ M)? # Non-negative integer, M (optional) | ||
| 174 | (?:(?!-) \d+\.\d+ S)? # Non-negative decimal, S (optional) | ||
| 175 | )? # Entire T part is optional | ||
| 176 | )$/x, | ||
| 177 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | #====================================================================== | ||
| 183 | package XML::Pastor::Builtin::ENTITIES; | ||
| 184 | 10 | our @ISA = qw(XML::Pastor::Builtin::List); | |
| 185 | |||
| 186 | 10 | XML::Pastor::Builtin::ENTITIES->XmlSchemaType( bless( { | |
| 187 | 'class' => 'XML::Pastor::Builtin::ENTITIES', | ||
| 188 | 'contentType' => 'simple', | ||
| 189 | 'derivedBy' => 'list', | ||
| 190 | 'name' => 'ENTITIES|http://www.w3.org/2001/XMLSchema', | ||
| 191 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 192 | |||
| 193 | |||
| 194 | |||
| 195 | #====================================================================== | ||
| 196 | package XML::Pastor::Builtin::ENTITY; | ||
| 197 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 198 | |||
| 199 | 10 | XML::Pastor::Builtin::ENTITY->XmlSchemaType( bless( { | |
| 200 | 'class' => 'XML::Pastor::Builtin::ENTITY', | ||
| 201 | 'contentType' => 'simple', | ||
| 202 | 'derivedBy' => 'restriction', | ||
| 203 | 'name' => 'ENTITY|http://www.w3.org/2001/XMLSchema', | ||
| 204 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 205 | |||
| 206 | |||
| 207 | #====================================================================== | ||
| 208 | package XML::Pastor::Builtin::float; | ||
| 209 | 10 | our @ISA = qw(XML::Pastor::Builtin::Numeric); | |
| 210 | |||
| 211 | 10 | XML::Pastor::Builtin::float->XmlSchemaType( bless( { | |
| 212 | 'class' => 'XML::Pastor::Builtin::float', | ||
| 213 | 'contentType' => 'simple', | ||
| 214 | 'derivedBy' => 'restriction', | ||
| 215 | 'name' => 'float|http://www.w3.org/2001/XMLSchema', | ||
| 216 | 'regex' => qr/^[+-]?(?:(?:INF)|(?:NaN)|(?:\d+(?:\.\d+)?)(?:[eE][+-]?\d+)?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 217 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 218 | |||
| 219 | |||
| 220 | #====================================================================== | ||
| 221 | package XML::Pastor::Builtin::gDay; | ||
| 222 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 223 | |||
| 224 | 10 | XML::Pastor::Builtin::gDay->XmlSchemaType( bless( { | |
| 225 | 'class' => 'XML::Pastor::Builtin::gDay', | ||
| 226 | 'contentType' => 'simple', | ||
| 227 | 'derivedBy' => 'restriction', | ||
| 228 | 'name' => 'gDay|http://www.w3.org/2001/XMLSchema', | ||
| 229 | 'regex' => qr /^---([0-2]\d{1}|3[0|1])(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 230 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 231 | |||
| 232 | |||
| 233 | |||
| 234 | #====================================================================== | ||
| 235 | package XML::Pastor::Builtin::gMonth; | ||
| 236 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 237 | |||
| 238 | 10 | XML::Pastor::Builtin::gMonth->XmlSchemaType( bless( { | |
| 239 | 'class' => 'XML::Pastor::Builtin::gMonth', | ||
| 240 | 'contentType' => 'simple', | ||
| 241 | 'derivedBy' => 'restriction', | ||
| 242 | 'name' => 'gMonth|http://www.w3.org/2001/XMLSchema', | ||
| 243 | 'regex' => qr /^--(0\d|1[0-2])(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 244 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 245 | |||
| 246 | |||
| 247 | |||
| 248 | #====================================================================== | ||
| 249 | package XML::Pastor::Builtin::gMonthDay; | ||
| 250 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 251 | |||
| 252 | 10 | XML::Pastor::Builtin::gMonthDay->XmlSchemaType( bless( { | |
| 253 | 'class' => 'XML::Pastor::Builtin::gMonthDay', | ||
| 254 | 'contentType' => 'simple', | ||
| 255 | 'derivedBy' => 'restriction', | ||
| 256 | 'name' => 'gMonthDay|http://www.w3.org/2001/XMLSchema', | ||
| 257 | 'regex' => qr /^--(\d{2,})-(\d\d)(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 258 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 259 | |||
| 260 | |||
| 261 | |||
| 262 | #====================================================================== | ||
| 263 | package XML::Pastor::Builtin::gYear; | ||
| 264 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 265 | |||
| 266 | 10 | XML::Pastor::Builtin::gYear->XmlSchemaType( bless( { | |
| 267 | 'class' => 'XML::Pastor::Builtin::gYear', | ||
| 268 | 'contentType' => 'simple', | ||
| 269 | 'derivedBy' => 'restriction', | ||
| 270 | 'name' => 'gYear|http://www.w3.org/2001/XMLSchema', | ||
| 271 | 'regex' => qr /^[-]?(\d{4,})(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 272 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 273 | |||
| 274 | |||
| 275 | |||
| 276 | |||
| 277 | #====================================================================== | ||
| 278 | package XML::Pastor::Builtin::gYearMonth; | ||
| 279 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 280 | |||
| 281 | 10 | XML::Pastor::Builtin::gYearMonth->XmlSchemaType( bless( { | |
| 282 | 'class' => 'XML::Pastor::Builtin::gYearMonth', | ||
| 283 | 'contentType' => 'simple', | ||
| 284 | 'derivedBy' => 'restriction', | ||
| 285 | 'name' => 'gYearMonth|http://www.w3.org/2001/XMLSchema', | ||
| 286 | 'regex' => qr /^[-]?(\d{4,})-(1[0-2]{1}|0\d{1})(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 287 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 288 | |||
| 289 | |||
| 290 | |||
| 291 | |||
| 292 | |||
| 293 | #====================================================================== | ||
| 294 | package XML::Pastor::Builtin::ID; | ||
| 295 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 296 | |||
| 297 | 10 | XML::Pastor::Builtin::ID->XmlSchemaType( bless( { | |
| 298 | 'class' => 'XML::Pastor::Builtin::ID', | ||
| 299 | 'contentType' => 'simple', | ||
| 300 | 'derivedBy' => 'restriction', | ||
| 301 | 'name' => 'ID|http://www.w3.org/2001/XMLSchema', | ||
| 302 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 303 | |||
| 304 | |||
| 305 | #====================================================================== | ||
| 306 | package XML::Pastor::Builtin::IDREF; | ||
| 307 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 308 | |||
| 309 | 10 | XML::Pastor::Builtin::IDREF->XmlSchemaType( bless( { | |
| 310 | 'class' => 'XML::Pastor::Builtin::IDREF', | ||
| 311 | 'contentType' => 'simple', | ||
| 312 | 'derivedBy' => 'restriction', | ||
| 313 | 'name' => 'IDREF|http://www.w3.org/2001/XMLSchema', | ||
| 314 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 315 | |||
| 316 | |||
| 317 | |||
| 318 | |||
| 319 | #====================================================================== | ||
| 320 | package XML::Pastor::Builtin::IDREFS; | ||
| 321 | 10 | our @ISA = qw(XML::Pastor::Builtin::List); | |
| 322 | |||
| 323 | 10 | XML::Pastor::Builtin::IDREFS->XmlSchemaType( bless( { | |
| 324 | 'class' => 'XML::Pastor::Builtin::IDREFS', | ||
| 325 | 'contentType' => 'simple', | ||
| 326 | 'derivedBy' => 'list', | ||
| 327 | 'name' => 'IDREFS|http://www.w3.org/2001/XMLSchema', | ||
| 328 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 329 | |||
| 330 | |||
| 331 | |||
| 332 | |||
| 333 | #====================================================================== | ||
| 334 | package XML::Pastor::Builtin::int; | ||
| 335 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 336 | |||
| 337 | 10 | XML::Pastor::Builtin::int->XmlSchemaType( bless( { | |
| 338 | 'class' => 'XML::Pastor::Builtin::int', | ||
| 339 | 'contentType' => 'simple', | ||
| 340 | 'derivedBy' => 'restriction', | ||
| 341 | 'maxInclusive' => 2147483647, | ||
| 342 | 'minInclusive' => -2147483648, | ||
| 343 | 'name' => 'int|http://www.w3.org/2001/XMLSchema', | ||
| 344 | 'regex' => qr/^[+-]?\d+$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 345 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 346 | |||
| 347 | |||
| 348 | |||
| 349 | |||
| 350 | #====================================================================== | ||
| 351 | package XML::Pastor::Builtin::language; | ||
| 352 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 353 | |||
| 354 | 10 | XML::Pastor::Builtin::language->XmlSchemaType( bless( { | |
| 355 | 'class' => 'XML::Pastor::Builtin::language', | ||
| 356 | 'contentType' => 'simple', | ||
| 357 | 'derivedBy' => 'restriction', | ||
| 358 | 'name' => 'language|http://www.w3.org/2001/XMLSchema', | ||
| 359 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 360 | |||
| 361 | |||
| 362 | |||
| 363 | #====================================================================== | ||
| 364 | package XML::Pastor::Builtin::long; | ||
| 365 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 366 | |||
| 367 | 10 | XML::Pastor::Builtin::long->XmlSchemaType( bless( { | |
| 368 | 'class' => 'XML::Pastor::Builtin::long', | ||
| 369 | 'contentType' => 'simple', | ||
| 370 | 'derivedBy' => 'restriction', | ||
| 371 | 'name' => 'long|http://www.w3.org/2001/XMLSchema', | ||
| 372 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 373 | |||
| 374 | |||
| 375 | #====================================================================== | ||
| 376 | package XML::Pastor::Builtin::Name; | ||
| 377 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 378 | |||
| 379 | 10 | XML::Pastor::Builtin::Name->XmlSchemaType( bless( { | |
| 380 | 'class' => 'XML::Pastor::Builtin::Name', | ||
| 381 | 'contentType' => 'simple', | ||
| 382 | 'derivedBy' => 'restriction', | ||
| 383 | 'name' => 'Name|http://www.w3.org/2001/XMLSchema', | ||
| 384 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 385 | |||
| 386 | |||
| 387 | |||
| 388 | #====================================================================== | ||
| 389 | package XML::Pastor::Builtin::NCName; | ||
| 390 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 391 | |||
| 392 | 10 | XML::Pastor::Builtin::NCName->XmlSchemaType( bless( { | |
| 393 | 'class' => 'XML::Pastor::Builtin::NCName', | ||
| 394 | 'contentType' => 'simple', | ||
| 395 | 'derivedBy' => 'restriction', | ||
| 396 | 'name' => 'NCName|http://www.w3.org/2001/XMLSchema', | ||
| 397 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 398 | |||
| 399 | |||
| 400 | |||
| 401 | #====================================================================== | ||
| 402 | package XML::Pastor::Builtin::negativeInteger; | ||
| 403 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonPositiveInteger); | |
| 404 | |||
| 405 | 10 | XML::Pastor::Builtin::negativeInteger->XmlSchemaType( bless( { | |
| 406 | 'class' => 'XML::Pastor::Builtin::negativeInteger', | ||
| 407 | 'contentType' => 'simple', | ||
| 408 | 'derivedBy' => 'restriction', | ||
| 409 | 'maxInclusive' => -1, | ||
| 410 | 'name' => 'negativeInteger|http://www.w3.org/2001/XMLSchema', | ||
| 411 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 412 | |||
| 413 | |||
| 414 | |||
| 415 | |||
| 416 | #====================================================================== | ||
| 417 | package XML::Pastor::Builtin::NMTOKEN; | ||
| 418 | 10 | our @ISA = qw(XML::Pastor::Builtin::token); | |
| 419 | |||
| 420 | 10 | XML::Pastor::Builtin::NMTOKEN->XmlSchemaType( bless( { | |
| 421 | 'class' => 'XML::Pastor::Builtin::NMTOKEN', | ||
| 422 | 'contentType' => 'simple', | ||
| 423 | 'derivedBy' => 'restriction', | ||
| 424 | 'name' => 'NMTOKEN|http://www.w3.org/2001/XMLSchema', | ||
| 425 | 'regex' => qr/^[-.:\w\d]*$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 426 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 427 | |||
| 428 | |||
| 429 | |||
| 430 | |||
| 431 | #====================================================================== | ||
| 432 | package XML::Pastor::Builtin::NMTOKENS; | ||
| 433 | 10 | our @ISA = qw(XML::Pastor::Builtin::List); | |
| 434 | |||
| 435 | 10 | XML::Pastor::Builtin::NMTOKENS->XmlSchemaType( bless( { | |
| 436 | 'class' => 'XML::Pastor::Builtin::NMTOKENS', | ||
| 437 | 'contentType' => 'simple', | ||
| 438 | 'derivedBy' => 'list', | ||
| 439 | 'name' => 'NMTOKENS|http://www.w3.org/2001/XMLSchema', | ||
| 440 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 441 | |||
| 442 | |||
| 443 | |||
| 444 | |||
| 445 | |||
| 446 | #====================================================================== | ||
| 447 | package XML::Pastor::Builtin::normalizedString; | ||
| 448 | 10 | our @ISA = qw(XML::Pastor::Builtin::string); | |
| 449 | |||
| 450 | 10 | XML::Pastor::Builtin::normalizedString->XmlSchemaType( bless( { | |
| 451 | 'class' => 'XML::Pastor::Builtin::normalizedString', | ||
| 452 | 'contentType' => 'simple', | ||
| 453 | 'derivedBy' => 'restriction', | ||
| 454 | 'name' => 'normalizedString|http://www.w3.org/2001/XMLSchema', | ||
| 455 | 'whiteSpace' => 'replace', | ||
| 456 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 457 | |||
| 458 | |||
| 459 | #====================================================================== | ||
| 460 | package XML::Pastor::Builtin::NOTATION; | ||
| 461 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 462 | |||
| 463 | 10 | XML::Pastor::Builtin::NOTATION->XmlSchemaType( bless( { | |
| 464 | 'class' => 'XML::Pastor::Builtin::NOTATION', | ||
| 465 | 'contentType' => 'simple', | ||
| 466 | 'derivedBy' => 'restriction', | ||
| 467 | 'name' => 'NOTATION|http://www.w3.org/2001/XMLSchema', | ||
| 468 | 'regex' => qr /^([A-z][A-z0-9]+:)?([A-z][A-z0-9]+)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 469 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 470 | |||
| 471 | |||
| 472 | |||
| 473 | |||
| 474 | #====================================================================== | ||
| 475 | package XML::Pastor::Builtin::positiveInteger; | ||
| 476 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonNegativeInteger); | |
| 477 | |||
| 478 | 10 | XML::Pastor::Builtin::positiveInteger->XmlSchemaType( bless( { | |
| 479 | 'class' => 'XML::Pastor::Builtin::positiveInteger', | ||
| 480 | 'contentType' => 'simple', | ||
| 481 | 'derivedBy' => 'restriction', | ||
| 482 | 'minInclusive' => 1, | ||
| 483 | 'name' => 'positiveInteger|http://www.w3.org/2001/XMLSchema', | ||
| 484 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 485 | |||
| 486 | |||
| 487 | |||
| 488 | |||
| 489 | #====================================================================== | ||
| 490 | package XML::Pastor::Builtin::QName; | ||
| 491 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 492 | |||
| 493 | 10 | XML::Pastor::Builtin::QName->XmlSchemaType( bless( { | |
| 494 | 'class' => 'XML::Pastor::Builtin::QName', | ||
| 495 | 'contentType' => 'simple', | ||
| 496 | 'derivedBy' => 'restriction', | ||
| 497 | 'name' => 'QName|http://www.w3.org/2001/XMLSchema', | ||
| 498 | 'regex' => qr /^([A-z][A-z0-9]+:)?([A-z][A-z0-9]+)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 499 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 500 | |||
| 501 | |||
| 502 | |||
| 503 | #====================================================================== | ||
| 504 | package XML::Pastor::Builtin::short; | ||
| 505 | 10 | our @ISA = qw(XML::Pastor::Builtin::integer); | |
| 506 | |||
| 507 | 10 | XML::Pastor::Builtin::short->XmlSchemaType( bless( { | |
| 508 | 'class' => 'XML::Pastor::Builtin::short', | ||
| 509 | 'contentType' => 'simple', | ||
| 510 | 'derivedBy' => 'restriction', | ||
| 511 | 'maxInclusive' => 32767, | ||
| 512 | 'minInclusive' => -32768, | ||
| 513 | 'name' => 'short|http://www.w3.org/2001/XMLSchema', | ||
| 514 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 515 | |||
| 516 | |||
| 517 | |||
| 518 | |||
| 519 | #====================================================================== | ||
| 520 | package XML::Pastor::Builtin::time; | ||
| 521 | 10 | our @ISA = qw(XML::Pastor::Builtin::Scalar); | |
| 522 | |||
| 523 | 10 | XML::Pastor::Builtin::time->XmlSchemaType( bless( { | |
| 524 | 'class' => 'XML::Pastor::Builtin::time', | ||
| 525 | 'contentType' => 'simple', | ||
| 526 | 'derivedBy' => 'restriction', | ||
| 527 | 'name' => 'time|http://www.w3.org/2001/XMLSchema', | ||
| 528 | 'regex' => qr /^[0-2]\d:[0-5]\d:[0-5]\d(\.\d+)?(Z?|([+|-]([0-1]\d|2[0-4])\:([0-5]\d))?)$/, # Regex shamelessly copied from XML::Validator::Schema by Sam Tregar | ||
| 529 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 530 | |||
| 531 | |||
| 532 | |||
| 533 | #====================================================================== | ||
| 534 | package XML::Pastor::Builtin::unsignedByte; | ||
| 535 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonNegativeInteger); | |
| 536 | |||
| 537 | 10 | XML::Pastor::Builtin::unsignedByte->XmlSchemaType( bless( { | |
| 538 | 'class' => 'XML::Pastor::Builtin::unsignedByte', | ||
| 539 | 'contentType' => 'simple', | ||
| 540 | 'derivedBy' => 'restriction', | ||
| 541 | 'maxInclusive' => 255, | ||
| 542 | 'minInclusive' => 0, | ||
| 543 | 'name' => 'unsignedByte|http://www.w3.org/2001/XMLSchema', | ||
| 544 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 545 | |||
| 546 | |||
| 547 | |||
| 548 | #====================================================================== | ||
| 549 | package XML::Pastor::Builtin::unsignedInt; | ||
| 550 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonNegativeInteger); | |
| 551 | |||
| 552 | 10 | XML::Pastor::Builtin::unsignedInt->XmlSchemaType( bless( { | |
| 553 | 'class' => 'XML::Pastor::Builtin::unsignedInt', | ||
| 554 | 'contentType' => 'simple', | ||
| 555 | 'derivedBy' => 'restriction', | ||
| 556 | 'maxInclusive' => 4294967295, | ||
| 557 | 'minInclusive' => 0, | ||
| 558 | 'name' => 'unsignedInt|http://www.w3.org/2001/XMLSchema', | ||
| 559 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 560 | |||
| 561 | |||
| 562 | |||
| 563 | #====================================================================== | ||
| 564 | package XML::Pastor::Builtin::unsignedLong; | ||
| 565 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonNegativeInteger); | |
| 566 | |||
| 567 | 10 | XML::Pastor::Builtin::unsignedLong->XmlSchemaType( bless( { | |
| 568 | 'class' => 'XML::Pastor::Builtin::unsignedLong', | ||
| 569 | 'contentType' => 'simple', | ||
| 570 | 'derivedBy' => 'restriction', | ||
| 571 | 'name' => 'unsignedLong|http://www.w3.org/2001/XMLSchema', | ||
| 572 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 573 | |||
| 574 | |||
| 575 | |||
| 576 | #====================================================================== | ||
| 577 | package XML::Pastor::Builtin::unsignedShort; | ||
| 578 | 10 | our @ISA = qw(XML::Pastor::Builtin::nonNegativeInteger); | |
| 579 | |||
| 580 | 10 | XML::Pastor::Builtin::unsignedShort->XmlSchemaType( bless( { | |
| 581 | 'class' => 'XML::Pastor::Builtin::unsignedShort', | ||
| 582 | 'contentType' => 'simple', | ||
| 583 | 'derivedBy' => 'restriction', | ||
| 584 | 'maxInclusive' => 65535, | ||
| 585 | 'minInclusive' => 0, | ||
| 586 | 'name' => 'unsignedShort|http://www.w3.org/2001/XMLSchema', | ||
| 587 | }, 'XML::Pastor::Schema::SimpleType' ) ); | ||
| 588 | |||
| 589 | |||
| 590 | |||
| 591 | 10 | 1; | |
| 592 | |||
| 593 | __END__ | ||