netconfcentral logo

yuma-xsd

HTML

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

Summary

  
  
Organization Netconf Central
  
Module yuma-xsd
Version 2009-11-21
File yuma-xsd.yang
  
Prefix xsd
Namespace
  
Cooked /cookedmodules/yuma-xsd/2009-11-21
YANG /src/yuma-xsd@2009-11-21.yang
XSD /xsd/yuma-xsd@2009-11-21.xsd
  
Abstract XSD derived types for usage in YANG. Copyright (c) 2007 - 2009 Andy Bierman and the persons identified as authors of the code. ...
  
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

Typedefs

Typedef Base type Abstract
anyURI string XSD universal resource identifier string type.
base64Binary string XSD base64 binary encoded string
byte int8 XSD 8 bit signed integer.
date string XSD date string type.
dateTime string XSD date and time string type.
decimal string XSD decimal data type. [To do: not sure if this is a bounded real number or an unbounded real number.].
duration string XSD duration string type.
ENTITIES string XSD ENTITIES attribute type.
ENTITY string XSD ENTITY attribute type.
gDay string XSD day string type.
gMonth string XSD month string type.
gMonthDay string XSD month and day string type.
gYear string XSD year string type.
gYearMonth string XSD year and month string type.
hexBinary binary XSD hex binary encoded string
ID string XSD ID attribute type.
IDREF string XSD IDREF attribute type.
IDREFS string XSD IDREFS attribute type.
int int32 XSD 32 bit signed integer.
integer string 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
language string XSD language identifier string type.
long int64 XSD 64 bit signed integer.
Name string XSD name string type.
NCName string XSD not-namespace-qualified name string type.
negativeInteger string 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
NMTOKEN string XSD NMTOKEN attribute type.
NMTOKENS string XSD NMTOKENS attribute type.
nonNegativeInteger string 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
nonPositiveInteger string 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
normalizedString string XSD normalized string
NOTATION string XSD NOTATION attribute type.
positiveInteger string 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
QName string XSD namespace-qualified name string type.
short int16 XSD 16 bit signed integer.
time string XSD time string type.
token string XSD token string
unsignedByte uint8 XSD 8 bit unsigned integer.
unsignedInt uint32 XSD 32 bit unsigned integer.
unsignedLong uint64 XSD 64 bit unsigned integer.
unsignedShort uint16 XSD 16 bit unsigned integer.