yuma-xsd

XSD derived types for usage in YANG. Copyright (c) 2007 - 2009 Andy Bierman and the persons identified as authors of the code. ...

  • Version: 2009-11-21

    yuma-xsd@2009-11-21


    
      module yuma-xsd {
    
        yang-version 1;
    
        namespace
          "http://www.w3.org/2001/XMLSchema";
    
        prefix xsd;
    
        organization "Netconf Central";
    
        contact
          "Andy Bierman <andy@netconfcentral.org>";
    
        description
          "XSD derived types for usage in YANG.
    
         Copyright (c) 2007 - 2009 Andy Bierman and the persons
         identified as authors of the code.  All rights reserved.
    
         Redistribution and use in source and binary forms, with or
         without modification, is permitted pursuant to, and subject
         to the license terms contained in, the BSD 3-Clause License
         http://opensource.org/licenses/BSD-3-Clause";
    
        revision "2009-11-21" {
          description "Rename xsd to yuma-xsd.";
        }
    
        revision "2007-12-06" {
          description
            "Initial revision.  There is more work to do
               filling in patterns for some of the string types";
        }
    
    
        typedef normalizedString {
          type string;
          description "XSD normalized string";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#normalizedString";
    
        }
    
        typedef token {
          type string;
          description "XSD token string";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#token";
    
        }
    
        typedef base64Binary {
          type string;
          description
            "XSD base64 binary encoded string";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#base64Binary";
    
        }
    
        typedef hexBinary {
          type binary;
          description
            "XSD hex binary encoded string";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#hexBinary";
    
        }
    
        typedef integer {
          type string {
            pattern '[\-+]?[0-9]+';
          }
          description
            "XSD unbounded integer type. 
             This cannot be given a range like a number.
             This pattern does not supoort string representations
             of numbers, such as one two three";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#integer";
    
        }
    
        typedef positiveInteger {
          type string {
            pattern '[\+]?[1-9]+[0-9]*';
          }
          description
            "XSD unbounded positive integer.
             This cannot be given a range like a number.
             This pattern does not supoort string representations
             of numbers, such as one two three";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#positiveInteger";
    
        }
    
        typedef negativeInteger {
          type string {
            pattern '[\-]?[1-9]+[0-9]*';
          }
          description
            "XSD unbounded negative integer.
             This cannot be given a range like a number.
             This pattern does not supoort string representations
             of numbers, such as one two three";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#negativeInteger";
    
        }
    
        typedef nonNegativeInteger {
          type string {
            pattern '[\+]?[0-9]*';
          }
          description
            "XSD unbounded non-negative integer.
             This cannot be given a range like a number.
             This pattern does not supoort string representations
             of numbers, such as one two three";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#nonNegativeInteger";
    
        }
    
        typedef nonPositiveInteger {
          type string {
            pattern '\-[1-9]+[0-9]*';
          }
          description
            "XSD unbounded non-positive integer.
             This cannot be given a range like a number.
             This pattern does not supoort string representations
             of numbers, such as one two three";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#nonPositiveInteger";
    
        }
    
        typedef long {
          type int64;
          description
            "XSD 64 bit signed integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#long";
    
        }
    
        typedef unsignedLong {
          type uint64;
          description
            "XSD 64 bit unsigned integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#unsignedLong";
    
        }
    
        typedef int {
          type int32;
          description
            "XSD 32 bit signed integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#int";
    
        }
    
        typedef unsignedInt {
          type uint32;
          description
            "XSD 32 bit unsigned integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#unsignedInt";
    
        }
    
        typedef short {
          type int16;
          description
            "XSD 16 bit signed integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#short";
    
        }
    
        typedef unsignedShort {
          type uint16;
          description
            "XSD 16 bit unsigned integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#unsignedShort";
    
        }
    
        typedef byte {
          type int8;
          description
            "XSD 8 bit signed integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#byte";
    
        }
    
        typedef unsignedByte {
          type uint8;
          description
            "XSD 8 bit unsigned integer.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#unsignedByte";
    
        }
    
        typedef decimal {
          type string;
          description
            "XSD decimal data type.
             [To do: not sure if this is a bounded real number
              or an unbounded real number.].";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#decimal";
    
        }
    
        typedef duration {
          type string;
          description
            "XSD duration string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#duration";
    
        }
    
        typedef dateTime {
          type string {
            pattern
              '-?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
                + '(Z|(\+|-)\d{2}:\d{2})';
          }
          description
            "XSD date and time string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#dateTime";
    
        }
    
        typedef date {
          type string;
          description "XSD date string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#date";
    
        }
    
        typedef time {
          type string;
          description "XSD time string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#time";
    
        }
    
        typedef gYear {
          type string;
          description "XSD year string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#gYear";
    
        }
    
        typedef gYearMonth {
          type string;
          description
            "XSD year and month string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#gYearMonth";
    
        }
    
        typedef gMonth {
          type string;
          description "XSD month string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#gMonth";
    
        }
    
        typedef gMonthDay {
          type string;
          description
            "XSD month and day string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#gMonthDay";
    
        }
    
        typedef gDay {
          type string;
          description "XSD day string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#gDay";
    
        }
    
        typedef Name {
          type string;
          description "XSD name string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#Name";
    
        }
    
        typedef QName {
          type string;
          description
            "XSD namespace-qualified name string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#QName";
    
        }
    
        typedef NCName {
          type string {
            pattern '[\i-[:]][\c-[:]]*';
          }
          description
            "XSD not-namespace-qualified name string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NCName";
    
        }
    
        typedef anyURI {
          type string;
          description
            "XSD universal resource identifier string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#anyURI";
    
        }
    
        typedef language {
          type string;
          description
            "XSD language identifier string type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#language";
    
        }
    
        typedef ID {
          type string;
          description "XSD ID attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID";
    
        }
    
        typedef IDREF {
          type string;
          description
            "XSD IDREF attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#IDREF";
    
        }
    
        typedef IDREFS {
          type string;
          description
            "XSD IDREFS attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#IDREFS";
    
        }
    
        typedef ENTITY {
          type string;
          description
            "XSD ENTITY attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ENTITY";
    
        }
    
        typedef ENTITIES {
          type string;
          description
            "XSD ENTITIES attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ENTITIES";
    
        }
    
        typedef NOTATION {
          type string;
          description
            "XSD NOTATION attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NOTATION";
    
        }
    
        typedef NMTOKEN {
          type string;
          description
            "XSD NMTOKEN attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NMTOKEN";
    
        }
    
        typedef NMTOKENS {
          type string;
          description
            "XSD NMTOKENS attribute type.";
          reference
            "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NMTOKENS";
    
        }
      }  // module yuma-xsd
    

© 2023 YumaWorks, Inc. All rights reserved.