XML Schema Standard Type Library (XSSTL) is a collection of universally-useful data types defined in the W3C XML Schema language. The following types are available in the latest version of the library:
| email-address.xsd | |
|---|---|
| EmailAddress | Email address |
| ipv4-address.xsd | |
| IPv4Address | IPv4 address in the dotted-decimal notation |
| Port | Port number |
| IPv4Endpoint | IPv4 address and port pair |
| IPv4EndpointStruct | Structured IPv4 address and port pair |
| iso3166-country-code.xsd | |
| ISO3166CountyCode | Two-letter (alpha-2) ISO 3166-1 country code |
| percentage.xsd | |
| Percentage | Percent value in the range [0, 100] |
| phone-number.xsd | |
| PhoneNumber | Full international telephone number |
| PhoneCountryCode | Telephone country code |
| PhoneAreaCode | Telephone area code |
| PhoneSubscriberNumber | Telephone subscriber number |
| PhoneExtensionNumber | Telephone extension number |
| PhoneNumberStruct | Structured full international telephone number |
| rfc822-date-time.xsd | |
| RFC822DateTime | Date and time formatted according to RFC822 |
| us-state-code.xsd | |
| USStateTerritoryCode | 50 states + 9 territories |
| USStateCode | 50 states + District of Columbia |
| USTerritoryCode | 9 territories - District of Columbia |
| USContinentalStateCode | USStateCode - Hawaii |
| USContiguousStateCode | USContinentalStateCode - Alaska |
To make all the types from XSSTL available in your schema simply add the following import directive:
<import namespace="http://www.codesynthesis.com/xmlns/xsstl"
schemaLocation="xsstl.xsd"/>
And the following namespace-to-prefix mapping to your schema root:
xmlns:stl="http://www.codesynthesis.com/xmlns/xsstl"
Alternatively, you can import individual types:
<import namespace="http://www.codesynthesis.com/xmlns/xsstl"
schemaLocation="xsstl/email-address.xsd"/>
<import namespace="http://www.codesynthesis.com/xmlns/xsstl"
schemaLocation="xsstl/phone-number.xsd"/>
License
Redistribution and use in source and binary forms, with or without modification, are permitted under the terms of the BSD license.
Download
xsstl-1.0.0.tar.gz |
sha1: b149c4f851477968c81c1916b75bb861a502c364 |
|---|---|
xsstl-1.0.0.zip |
sha1: fecefb3eb330d94bd8d898a0cdef70ad4d67b5fd |
| all versions |
Feedback
Send bug reports, contributions or any other feedback to the xsstl-users mailing list.