Network Working Group                                         E. Stephan
Internet-Draft                                            France Telecom
Intended status: Best Current                           January 17, 2007
Practice
Expires: July 21, 2007


         A XMLTemplate for editing and sharing MIB module items
              draft-stephan-ops-xml-mib-module-template-00

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on July 21, 2007.

Copyright Notice

   Copyright (C) The IETF Trust (2007).

Abstract

   This memo presents a basic solution for editing SMI objects in XML.
   Based on this approach it specifies a XML template for specifing SMI
   objects and proposes a common framework for translating SMI objects
   definitions to other datamodel.  Finally it introduces some
   connections with XML oriented Internet management.





Stephan                   Expires July 21, 2007                 [Page 1]

Internet-Draft           XML MIB Module Template            January 2007


Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].


Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Motivation . . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  Convention And Terminology . . . . . . . . . . . . . . . . . .  4
   4.  Internet-Draft MIB editing in XML  . . . . . . . . . . . . . .  5
   5.  Specifying SMI objects in XML  . . . . . . . . . . . . . . . .  5
     5.1.  Object example of a MIB object is XML  . . . . . . . . . .  7
     5.2.  Going further than editing . . . . . . . . . . . . . . . .  7
   6.  XML template for SMI object  . . . . . . . . . . . . . . . . .  8
     6.1.  XML tree for SMI objects and MIB module  . . . . . . . . .  8
     6.2.  A Framework for defining the XML Template of SMI items . .  8
     6.3.  XML tree of a MIB object definition  . . . . . . . . . . .  9
   7.  Proposed actions for tied XML & SMI Internet management  . . .  9
   8.  Sample MIB Definitions . . . . . . . . . . . . . . . . . . . . 10
   9.  XSL base for XML MIB module transformation . . . . . . . . . . 18
   10. Appendix 1: XSL Evaluation script  . . . . . . . . . . . . . . 20
   11. IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 21
   12. Security Considerations  . . . . . . . . . . . . . . . . . . . 21
   13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 22
   14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
     14.1. Normative References . . . . . . . . . . . . . . . . . . . 22
     14.2. Informative References . . . . . . . . . . . . . . . . . . 22
   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 23
   Intellectual Property and Copyright Statements . . . . . . . . . . 24



















Stephan                   Expires July 21, 2007                 [Page 2]

Internet-Draft           XML MIB Module Template            January 2007


1.  Introduction

   This memo presents a basic solution for editing SMI objects in XML.
   Based on this approach it specifies a XML template for specifing SMI
   objects and proposes a common framework for translating SMI objects
   definitions to other datamodel.  Finally it introduces some
   connections with XML oriented Internet management.

   The purpose of this draft in not only to make MIB module editing in
   XML simpler but to propose a common way to write SMI objects
   definitions in XML that facilitates their usages in XML oriented
   Internet Management.

   It is based on the case study of the editing of
   [I-D.ietf-pce-disc-mib] using xml2rfc-xxe [xml2rfc-xxe].

   This document is built on notions introduced in Internet-Standard
   Management Framework, see section 7 of RFC 3410 [RFC3410] and on and
   XML references [XML].  The reader should be familiar with these
   documents.


2.  Motivation

   [StrKli03] gives the state of the art in terms of XML oriented
   Internet Management.  It presents solutions relying on the conversion
   of MIB documents and SNMP data into XML documents.  The main benefit
   is the usage objects already designed and standardized for managing
   Internet avoiding duplication of objects and definitions overlapping.
   Discarding MIB objects and SMI clauses during the conversion does not
   reduce this benefit because intrinsically the objects are still SMI
   items specified according the Internet-Standard Management Framework
   and referenced in a standard management module.

   Since this publication the usage of XML for Internet management
   increased dramatically.  This intensification has naturally some side
   effect on Internet Standard specifications: They tend to include
   management interfaces specified only in XML.  As an example "Section
   7.  XML Schema for traceroute Measurements"
   [I-D.ietf-ippm-storetraceroutes] uses a lot of TC from SMIv2 and a
   lot of objects from DISMAN-TRACEROUTE-MIB; Another trend consists in
   specifying the configuration interface in XML in a separate document
   because authors consider that SNMP is not suitable or because the SMI
   is not rich enough, or because combining objects from several MIB
   modules is tricky and not promoted.  As an example
   [I-D.muenz-ipfix-configuration] specifies a management interface in
   XML for configuring IPFIX and PSAMP devices despite 3 drafts specify
   MIB modules for IPFIX or PSAMP devices.



Stephan                   Expires July 21, 2007                 [Page 3]

Internet-Draft           XML MIB Module Template            January 2007


   At this step it is clear that authors' motivations for choosing XML
   are real and that IETF must urgently provide them with some standard
   to specify or to reuse SMI objects in XML.

   Some connected initiatives started in the PCE WG at the will of IESG
   a year ago.  PCE WG experiments the usage of a mandatory section per
   draft to describe manageability considerations and requirements.
   [I-D.ietf-pce-manageability-requirements] gives the guidance.  The
   first output is the design of [I-D.ietf-pce-disc-mib] based on
   section 10.4 of[RFC4674].  This top-down approach has at least 2
   avantages: It leads to a clear design of the management interface and
   to excellent cooperations between contributors; From a wider
   perspective it provides management specifications not depending on
   any specific protocols or data models.

   Aside from this IESG initiative, to go further in the same direction
   the author specified the objects of the MIB module
   [I-D.ietf-pce-disc-mib] in XML.  After a quick tour of the state of
   the art in terms of Internet-Draft MIB module editing, section
   Section 5 presents this experiment and gives its benefits for MIB
   module editing and for the reusability of MIB module objects by other
   data models.  Then, section Section 6 proposes a XML framework for
   editing SMI objects' definitions and for sharing them among different
   kinds of management interfaces in use in Internet Specifications.  As
   it doesn't impact the current Internet-Standard Management Framework
   it is usable immediatly in parallel with deeper efforts to prepare
   the usage of SMI items under specification in XML oriented internet
   management such as NETCONF [RFC4742].

   Section 6 proposes a XML framework for editing and sharing SMI
   objects' definitions which impacts so littlely the Internet-Standard
   Management Framework that it is usable immediatly for experimenting
   the usage of SMI objects definitions in XML oriented internet
   management.


3.  Convention And Terminology

   MIB and PIB:

      The term MIB stands for both of them.

   MIB module document:

      A internet-Draft specifying a MIB module.

   MIB module:




Stephan                   Expires July 21, 2007                 [Page 4]

Internet-Draft           XML MIB Module Template            January 2007


      The part of the MIB module document that specifies the objects
      using the SMI langage.

   SMI item:

      A definition of an element of MIB module based of the SMI (e.g.
      IMPORT, node, object, conformance...)

   SMI object:

      A definition of an object based on the SMI.

   clause:

      A clause if a part of a SMI macro as defined in RFC2578.


4.   Internet-Draft MIB editing in XML

   Various tools exist for editing a MIB module.  This draft focuses on
   the editing of a Internet-Draft of a MIB module in XML in the context
   of the IETF standardisation process.

   [RFC2629] Specifies the XML structures for writing I-Ds and RFCs
   using XML.  Xml2rfc-xxe [xml2rfc-xxe] is commonly used to edit a
   draft in XML.  It includes numerous connections with xml2rfc to
   translate the XML document in RFC text style, in html or in PDF.

   A specification of an IETF MIB document is made of a text part and of
   the MIB module part.  IETF provides MIB editors with precise
   guidance, rules and tools for structuring, editing, formating and
   checking each part of the document [FIXME].  "MIB Module Document
   Text Template" [I-D.harrington-text-mib-doc-template] provides a
   template of a MIB document.  The structure of [I-D.ietf-pce-disc-mib]
   is based on this template.  Unfortunately as this template is not
   available as a XML Internet-Draft each author has to translate
   manually each piece of text in XML.


5.  Specifying SMI objects in XML

   There is not any guidance available for editing a MIB module in XML.

   It is commonly agreed to encapsulated prematured edited MIB items in
   raw text using [RFC2629]<figure> elements.  This way of editing has
   severe limitations.





Stephan                   Expires July 21, 2007                 [Page 5]

Internet-Draft           XML MIB Module Template            January 2007


   1.  The editor must take care of all formating aspects such as the
       length of each line, bullet tabulation...This is against the
       spirit of xml2rfc and of course of XXE;

   2.  This is against the spirit of XML too because encapsulating
       objects definitions prevent any transformation of these
       definitions using XML standard features;

   3.  <figure> element is designed for inserting drawing and section
       2.3.1.3 of [RFC2629] recommends to keep the text version on one
       page.  So This XML element is not designed for long text.

   4.  A MIB module is commonly longer than 15 pages.  Editing such a
       text in a XML figure element is a nightmare because the editor
       has to prematurely take care of RFC 2223 line length of 69
       characters.

   5.  Last but not least, As the XML parser (xml2rfc) does not interfer
       with the content of a <figure> element, it reports the location
       of an (formating, escape...) error at the begin of the element.
       Consequently, the editor has to locate them by himself.

   A much efficient solution consists in editing MIB modules objects in
   XML without such a raw encapsulation.  After some investigation the
   [RFC2629] <list> element looks to be the right candidate and was used
   to write the MIB module of [I-D.ietf-pce-disc-mib].

   The results are excellent as illustrated in the section Section 5.1:

      The editing is user friendy under xml2rfc-xxe;

      xml2rfc deals with all the formating aspects;

      Wisiwyg: the display of the MIB object in xml2rfc-xxe and in the
      resulting draft are identical;

      The formating correspond to the one recommended for MIB object;

      The text version of this MIB module does not differ from a MIB
      module handcrafted;

      MIB module editing is very fast because RFC 2223 formating
      constraint don't interfer during XML MIB object copy and paste;

      Of course, as it applies on the text version, Smilint does not
      detect any specific points;





Stephan                   Expires July 21, 2007                 [Page 6]

Internet-Draft           XML MIB Module Template            January 2007


5.1.  Object example of a MIB object is XML

   The following example is a snapshot of an object being edited under
   XXE: The display is very similar to the corresponding text in the
   Internet-Draft.
   sample1Address OBJECT-TYPE
   [list style=empty]

       SYNTAX MacAddress

       MAX-ACCESS read-only

       STATUS current

       DESCRIPTION
       [list style=empty]

           "The MAC address used by this entity when it must be
           referred to in a unique fashion.  It is recommended that
           this be the numerically smallest MAC address of all ports
           that belong to this entity.  However it is only required to
           be unique.  When concatenated with samplePriority a unique
           Sample Identifier is formed which is used in the Sample
           Protocol."

       REFERENCE
       [list style=empty]

           "RFC 0768 clauses 14.4.1.1.3 and 7.12.5"

       ::= { sample1 1 }

   Note: this object comes from the MIB module of "MIB Module Document
   Text Template" [I-D.harrington-text-mib-doc-template]

5.2.  Going further than editing

   At this step it is clear that writing MIB module items in pure XML is
   the right direction.

   MIB module editing in XML will be faster if IETF provides the
   community with predefined XML template per type of SMI object and
   with an example of a XML MIB module inside a XML verion of an
   Internet-Draft.

   XML MIB module is the right direction not only for editing
   perspective but for enabling the usage of MIB module specifications
   by XML applications.



Stephan                   Expires July 21, 2007                 [Page 7]

Internet-Draft           XML MIB Module Template            January 2007


6.  XML template for SMI object

   This section identifies enhancements to the previous template leading
   to XML MIB object definitions and XML MIB modules directly
   interpreted by XML applications.

6.1.  XML tree for SMI objects and MIB module

   Enabling the usage of a MIB object definition by XML applications
   requires this definition to be a XML tree and requires each type of
   object to be distinguished.  Enabling the usage of a MIB module
   specification by XML applications requires this module to be a XML
   tree.

   The example of the sectionSection 5.1 is not a XML tree.  A heading
   XML element is missing.  Moreover this element must identify the type
   of smi item being defined.

   This may be solved throught numerous way: Defining a new Element;
   adding a new attribut to an existing Element or adding a new value to
   an existing attribut...

   The most convenient solution adresses all the needs in one, requires
   just a few change in of xml2rfc and doesn't affect its current
   usages:

      Reserved the value 'mibmodule' to the attribut @anchor of the
      <section> defining the MIB module;

      Adds an attribut @smi to the Element <list>;

      Defines @smi values (e.g.: scalar field, table, node...) which
      identifie the kind of the SMI item;

6.2.  A Framework for defining the XML Template of SMI items

   The following gives the rules for defining the XML template of MIB
   items corresponding to RFC2578-80 macros MODULE-IDENTITY, OBJECT-
   IDENTITY and OBJECT-TYPE, NOTIFICATION-TYPE, OBJECT-GROUP,
   NOTIFICATION-GROUP, MODULE-COMPLIANCE and AGENT-CAPABILITIES:

      The section of the Internet-Draft where is defined the MIB module
      The 'anchor' attribut of XML Element <section> of the draft which
      defines the MIB module has the value 'mibmodule';

      The definition of a any MIB item (objects, nodes, TC...) is
      embedded in a <list> element having a '@smi' attribut value sets
      to the corresponding type of the SMI macro;



Stephan                   Expires July 21, 2007                 [Page 8]

Internet-Draft           XML MIB Module Template            January 2007


      Name and value of a SMI clause having predefined values are
      handled in the same <t> Element;

      Name of a clause having a RFC2578 Text type is handled alone in a
      <t> Element;

      A Text value is handle in a <list>;

      A line of a Text value is handle in a <t>;

   SectionSection 6.3 give an example of a a XML tree.  A heading XML
   element is missing.  Moreover this element must identify the type of
   smi item being defined.

   The Sample MIB module of Section Section 8 gives examples of the
   writing of SMI items in XML.

6.3.  XML tree of a MIB object definition

<t><list smi='scalar'>
    <t>sample1Address OBJECT-TYPE</t>
    <t><list>
        <t>SYNTAX MacAddress</t>
        <t>MAX-ACCESS read-only</t>
        <t>STATUS current</t>
        <t>DESCRIPTION<list><t>
            "The MAC address used by this entity when it must be
            referred to in a unique fashion. It is recommended that this
            be the numerically smallest MAC address of all ports that
            belong to this entity. However it is only required to be
            unique. When concatenated with samplePriority a unique
            Sample Identifier is formed which is used in the Sample
            Protocol."
        </t></list></t>
        <t>REFERENCE<list><t>
            "RFC 0768 clauses 14.4.1.1.3 and 7.12.5"
        </t></list></t>
        <t>::= { sample1 1 }</t>
    </list></t>
</list></t>


7.  Proposed actions for tied XML & SMI Internet management

   This section propose 3 consecutive steps leading to the usage of MIB
   objects in XML based network management.

   The first step encourage the editing of Internet-Draft of MIB in XML:



Stephan                   Expires July 21, 2007                 [Page 9]

Internet-Draft           XML MIB Module Template            January 2007


   o  Write an example of an Internet-Draft having a MIB module writen
      in XML;

   o  Add this document to xml2rfc-xxe Internet-Draft examples.

   The second step touches xml2rfc code to improve the edition and the
   translation of MIB objects in XML:

   o  Add an attribute @smi to the [RFC2629] <list> element;

   o  Defines the XML templates and the values of the attribut @smi (see
      Section 8;

   o  Adapt xml2rfc to insert a single new line after the text value of
      a <list> element having a smi attribut;

   o  Add these templates in the GUI of xml2rfc-xxe (one per SMI type in
      xml2rfc-xxe insertion panel).

   The third step generalizes the usage of XML MIB items definitions by
   XML applications and by other data models:

   o  Have a common XSL base for the translation of SMI objects in any
      data model (see section Section 9);

   o  Derive specific XSL documents for data models and protocols
      commonly used for Internet network management;

   o  Write, complete the XML files needed (schema, DTD...);


8.  Sample MIB Definitions

<section anchor="mibmodule" title="Sample MIB Definitions">
      <t>SAMPLE-MIB DEFINITIONS ::= BEGIN</t>

      <t>-- ----------------------------------------------------------</t>

      <t>-- MIB for SAMPLE devices --</t>

      <t>-- ----------------------------------------------------------</t>

      <t></t>

      <t>IMPORTS<list smi='import'>
          <t>MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,</t>

          <t>Counter32, Integer32, TimeTicks, experimental<list>



Stephan                   Expires July 21, 2007                [Page 10]

Internet-Draft           XML MIB Module Template            January 2007


              <t>FROM SNMPv2-SMI</t>
            </list>TEXTUAL-CONVENTION, MacAddress<list>
              <t>FROM SNMPv2-TC</t>
            </list>MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP<list>
              <t>FROM SNMPv2-CONF</t>
            </list>InterfaceIndex FROM IF-MIB</t>

          <t>;</t>
        </list></t>

      <t>sampleMIB MODULE-IDENTITY<list smi='moduleidentity'>
          <t>LAST-UPDATED "200410220000Z"</t>

          <t>ORGANIZATION "IETF SAMPLE MIB Working Group"</t>

          <t>CONTACT-INFO<list>
              <t>"Email: ietfmibs@ops.ietf.org</t>

              <t>Tel:</t>

              <t>Email:</t>

              <t>Postal:</t>

              <t>Send comments to &lt;ietfmibs@ops.ietf.org&gt;"</t>
            </list></t>

          <t>DESCRIPTION<list>
              <t>"A sample MIB module for managing devices that support a
              SAMPLE protocol.</t>

              <t>Copyright (C) The Internet Society (2005). This version of
              this MIB module is part of RFC XXXX; see the RFC itself for full
              legal notices.</t>

              <t>-- RFC Ed.: replace XXXX with actual RFC number and remove
              this note</t>

              <t>"</t>
            </list></t>

          <t>REVISION "200509020000Z" -- 27 September 2005</t>

          <t>DESCRIPTION<list>
              <t>"Third revision, published as part of RFC XXXX.</t>

              <t>The MIB module has been converted to SMIv2 format.
              Conformance statements have been added and some description and



Stephan                   Expires July 21, 2007                [Page 11]

Internet-Draft           XML MIB Module Template            January 2007


              reference clauses have been updated.</t>

              <t>The object sampleObject999 was added to support SAMPLE v3 and
              the permissible values of samplePriority and samplePortPriority
              have been clarified for entities supporting SAMPLE v2.</t>

              <t>The interpretation of sampleLastChange has been clarified for
              entities supporting the foo feature of SAMPLE v2."</t>
            </list></t>

          <t>REVISION "199307310000Z"</t>

          <t>DESCRIPTION<list>
              <t>"Second revision, published as part of RFC BBBB."</t>
            </list></t>

          <t>REVISION "199112310000Z"</t>

          <t>DESCRIPTION<list>
              <t>"Initial revision, published as part of RFC AAAA."</t>
            </list></t>

          <t>::= { experimental 10000 }</t>
        </list> </t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- Suggested OID layout</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>sampleNotifications OBJECT IDENTIFIER ::= { sampleMIB 0 }</t>

      <t>sampleObjects OBJECT IDENTIFIER ::= { sampleMIB 1 }</t>

      <t>sampleConformance OBJECT IDENTIFIER ::= { sampleMIB 2 }</t>

      <t></t>

      <t>sampleCompliances OBJECT IDENTIFIER ::= { sampleConformance 1 }</t>

      <t>sampleGroups OBJECT IDENTIFIER ::= { sampleConformance 2 }</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- Textual Conventions</t>

      <t>-- ---------------------------------------------------------- --</t>



Stephan                   Expires July 21, 2007                [Page 12]

Internet-Draft           XML MIB Module Template            January 2007


      <t>-- All representations of MAC addresses in this MIB Module use,</t>

      <t>-- as a textual convention, the data type MacAddress, defined in</t>

      <t>-- SNMPv2-TC.</t>

      <t>-- Similarly, all representations of Sample-Id in this MIB</t>

      <t>-- module use, as a textual convention, the data type:</t>

      <t></t>

      <t>SampleId ::= TEXTUAL-CONVENTION<list smi='TC'>
          <t>STATUS current</t>

          <t>DESCRIPTION<list>
              <t>"The Sample-Identifier as used in the Sample Protocol to
              uniquely identify an entity. Its first two octets (in network
              byte order) contain a sample value and its last 6 octets contain
              the MAC address used to refer to an entity in a unique fashion
              (typically, the numerically smallest MAC address of all ports on
              the entity)."</t>
            </list>SYNTAX OCTET STRING (SIZE (8))</t>
        </list></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- the sample1 group</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t><list smi='node'>
          <t>sample1 OBJECT IDENTIFIER ::= { sampleObjects 1 }</t>
      </list></t>

      <t><list smi='scalar'>
          <t>sample1Address OBJECT-TYPE</t>

          <t><list>
              <t>SYNTAX MacAddress</t>

              <t>MAX-ACCESS read-only</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"The MAC address used by this entity when it must be
                  referred to in a unique fashion. It is recommended that this



Stephan                   Expires July 21, 2007                [Page 13]

Internet-Draft           XML MIB Module Template            January 2007


                  be the numerically smallest MAC address of all ports that
                  belong to this entity. However it is only required to be
                  unique. When concatenated with samplePriority a unique
                  Sample Identifier is formed which is used in the Sample
                  Protocol."</t>
                </list></t>

              <t>REFERENCE<list>
                  <t>"RFC 0768 clauses 14.4.1.1.3 and 7.12.5"</t>
                </list></t>

              <t>::= { sample1 1 }</t>
            </list></t>
        </list></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- the sample999 group</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t><list smi='node'>
          <t>sample999 OBJECT IDENTIFIER ::= { sampleObjects 2 }</t>
        </list></t>

      <t><list smi='scalar'>
          <t>sample999Address OBJECT-TYPE<list>
              <t>SYNTAX MacAddress</t>

              <t>MAX-ACCESS read-only</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"The MAC address used by this entity when it must be
                  referred to in a unique fashion. It is recommended that this
                  be the numerically smallest MAC address of all ports that
                  belong to this entity. However it is only required to be
                  unique. When concatenated with samplePriority a unique
                  Sample Identifier is formed which is used in the Sample
                  Protocol."</t>
                </list>REFERENCE<list>
                  <t>"RFC 0768 clauses 14.4.1.1.3 and 7.12.5"</t>
                </list></t>
              <t>::= { sample999 1 }</t>
            </list></t>
        </list></t>




Stephan                   Expires July 21, 2007                [Page 14]

Internet-Draft           XML MIB Module Template            January 2007


      <t>-- ---------------------------------------------------------- --</t>

      <t>-- Notifications for use by Sample entities</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t><list smi='notification'>
          <t>sampleNewRoot NOTIFICATION-TYPE<list>
              <t>-- OBJECTS { }</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"This notification indicates that the sending entity has
                  become the new root of the Sample Protocol coordination."</t>
                </list></t>

              <t>::= { sampleNotifications 1 }</t>
          </list></t>
      </list></t>

      <t><list smi='notification'>
          <t>sampleLastChange NOTIFICATION-TYPE<list>
              <t>-- OBJECTS { }</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t> "This notification is sent by an entity when any of its
                  configured ports transitions from the Sample1 state to the
                  Sample2 state, or from the Sample2 state to the Sample1 state.
                  The notification is not sent if a sampleNewRoot notification is
                  sent for the same transition."</t>
                </list>::= { sampleNotifications 2 }</t>
           </list></t>
      </list></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- Sample MIB - Conformance Information</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- the sample1 group</t>

      <t>-- ---------------------------------------------------------- --</t>



Stephan                   Expires July 21, 2007                [Page 15]

Internet-Draft           XML MIB Module Template            January 2007


      <t><list smi= 'objectgroup' >
          <t>sample1Group OBJECT-GROUP<list>
              <t>OBJECTS {</t>

              <t><list>
                  <t>sample1Address</t>
                </list>}</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"Sample1 information for this device."</t>
                </list></t>
            </list>::= { sampleGroups 1 }</t>
        </list></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- the sample999 group</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t><list smi= 'objectgroup' >
          <t>sample999Group OBJECT-GROUP<list>
              <t>OBJECTS {<list>
                  <t>sample999Address</t>
                </list>}</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"Sample999 information for this device."</t>
                </list></t>
            </list>::= { sampleGroups 2 }</t>
        </list></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- The Sample Notification Group</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t><list smi= 'notificationgroup' >
          <t>sampleNotificationGroup NOTIFICATION-GROUP<list>
              <t>NOTIFICATIONS {<list>
                  <t>sampleNewRoot,</t>

                  <t>sampleLastChange</t>



Stephan                   Expires July 21, 2007                [Page 16]

Internet-Draft           XML MIB Module Template            January 2007


                </list>}</t>

              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"Group of objects describing notifications."</t>
                </list></t>
            </list>::= { sampleGroups 3 }</t>
        </list></t>

      <t></t>

      <t>-- ---------------------------------------------------------- --</t>

      <t>-- compliance statements</t>

      <t>-- ---------------------------------------------------------- --</t>

      <t></t>

      <t><list smi= 'modulecompliance' >
          <t>sampleFullCompliance MODULE-COMPLIANCE<list>
              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"The compliance statement for device support of Sample
                  services. This supports the Sample999 features of the Sample
                  Protocol"</t>
                </list>MODULE<list>
                  <t>MANDATORY-GROUPS {<list>
                      <t>sample1Group,</t>

                      <t>sample999Group,</t>

                      <t>sampleNotificationGroup</t>
                    </list>}</t>
                </list>GROUP sample1Group</t>

              <t>DESCRIPTION<list>
                  <t>"Implementation of this group is mandatory."</t>
                </list>GROUP sampleNotificationGroup</t>

              <t>DESCRIPTION<list>
                  <t>"Implementation of this group is mandatory."</t>
                </list></t>
            </list>::= { sampleCompliances 1 }</t>
        </list></t>




Stephan                   Expires July 21, 2007                [Page 17]

Internet-Draft           XML MIB Module Template            January 2007


      <t><list smi= 'modulecompliance'>
          <t>sampleBasicCompliance MODULE-COMPLIANCE<list>
              <t>STATUS current</t>

              <t>DESCRIPTION<list>
                  <t>"The compliance statement for devices supporting only
                  Sample1 management"</t>
                </list>MODULE<list>
                  <t>MANDATORY-GROUPS {<list>
                      <t>sample1Group</t>
                    </list>}</t>
                </list>GROUP sample1Group</t>

              <t>DESCRIPTION<list>
                  <t>"Implementation of this group is mandatory for entities
                  that support the Sample1 Protocol."</t>
                </list></t>
            </list>::= { sampleCompliances 2 }</t>
        </list>END</t>
    </section>


9.  XSL base for XML MIB module transformation

   Following is anexample of XSL file that may be applied on a XML MIB
   module (e.g.  Section 8 for extracting objects definitions.  It just
   lists the MIB items in a html table.

<?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/section[@anchor]">
    <xsl:choose>
      <xsl:when test="@anchor='mibmodule'">
        <xsl:call-template name="mibmodule"/>
      </xsl:when>
      <xsl:otherwise>
      </xsl:otherwise>
    </xsl:choose>
</xsl:template>


<xsl:template match="/section[@anchor]/t/list[@smi]">
  <TR>
    <!-- extract the smi item name and type -->
    <xsl:variable name="itemname" select="substring-before(./t/text(),' ')"/>
    <xsl:variable name="itemtype" select="@smi"/>




Stephan                   Expires July 21, 2007                [Page 18]

Internet-Draft           XML MIB Module Template            January 2007


    <TD><xsl:value-of select="$itemname"/></TD>
    <TD><xsl:value-of select="$itemtype"/></TD>
    <xsl:choose>
      <xsl:when test="@smi='node'">
        <xsl:call-template name="node"/>
      </xsl:when>
      <xsl:when test="@smi='scalar'">
        <xsl:call-template name="object"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="other"/>
      </xsl:otherwise>
    </xsl:choose>
  </TR>
</xsl:template>

<xsl:template name="mibmodule">
  <TABLE BORDER="1" CELLPADDING="3">
    <THEAD>
      <TH>name</TH><TH>type</TH><TH>syntax</TH><TH>access</TH><TH>status</TH><TH>parent</TH>
    </THEAD>
  <xsl:apply-templates select ="t/list[@smi]"/>
  </TABLE>
</xsl:template>

<xsl:template name="other">
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="string('-')"/></TD>
</xsl:template>

<xsl:template name="node">
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="string('-')"/></TD>
  <TD><xsl:value-of select="substring-after(./t/text(),'::=')"/></TD>
</xsl:template>

<xsl:template name="object">
  <xsl:for-each select="t/list/t">
    <xsl:choose>
      <xsl:when test="substring-before(.,' ') = 'SYNTAX'">
         <TD><xsl:value-of select="substring-after(.,' ')"/></TD>
      </xsl:when>
      <xsl:when test="substring-before(.,' ') = 'MAX-ACCESS'">
         <TD><xsl:value-of select="substring-after(.,' ')"/></TD>
      </xsl:when>



Stephan                   Expires July 21, 2007                [Page 19]

Internet-Draft           XML MIB Module Template            January 2007


      <xsl:when test="substring-before(.,' ') = 'STATUS'">
         <TD><xsl:value-of select="substring-after(.,' ')"/></TD>
      </xsl:when>
      <xsl:when test="substring-before(.,' ') = 'DESCRIPTION'">
      </xsl:when>
      <xsl:when test="substring-before(.,' ') = '::='">
         <TD><xsl:value-of select="substring-after(.,' ')"/></TD>
      </xsl:when>
      <xsl:otherwise>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:for-each>
</xsl:template>

</xsl:stylesheet>


10.  Appendix 1: XSL Evaluation script

   The following TCL script is given to quicky evaluate the benefits of
   the approach presented in the draft.

   the XSL transformation file of Section 9.  It loads the SAMPLE-MIB of
   Section 8 previously saved as SAMPLE-MIB.xml and the XSL file
   Section 9 previously saved as XslMibModule.xsl.

   Sourcing this small script in a TCL interpretor generates the HTML
   table of the SMI items of the SAMPLE-MIB module in the file
   xmlsmihtml.html of the current working directory.






















Stephan                   Expires July 21, 2007                [Page 20]

Internet-Draft           XML MIB Module Template            January 2007


package require xml
package require dom::libxml2
package require xslt

set cwd [pwd]

# xml file validation
#
set xmlfile [open SAMPLE-MIB.xml r]
set XmlMibModule [read $xmlfile ]

set xslfile [open XslMibModule.xsl r]
set XslMibModule [read $xslfile ]


set validXml [::dom::libxml2::parse $XmlMibModule]

# xml file validation
#
set validXsl [::dom::libxml2::parse $XslMibModule]

# xsl style sheet compilation
#
set ssheet [::xslt::compile $validXsl]

# xslt transformation
#
set xslOutput [$ssheet transform $validXml]
set htmlOutput [::dom::libxml2::serialize $xslOutput -method [$ssheet cget -method]]

puts  $htmlOutput

# save ouput
#
set outputFile [open $cwd/xmlsmihtml.html w+]
puts $outputFile $htmlOutput
close $outputFile


11.  IANA Considerations

   This document makes no request of IANA.


12.  Security Considerations

   Managing network devices remotly in a non-secure environment can have
   a negative effect on network operations.



Stephan                   Expires July 21, 2007                [Page 21]

Internet-Draft           XML MIB Module Template            January 2007


13.  Acknowledgements


14.  References

14.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2578]  McCloghrie, K., Ed., Perkins, D., Ed., and J.
              Schoenwaelder, Ed., "Structure of Management Information
              Version 2 (SMIv2)", STD 58, RFC 2578, April 1999.

   [RFC2579]  McCloghrie, K., Ed., Perkins, D., Ed., and J.
              Schoenwaelder, Ed., "Textual Conventions for SMIv2",
              STD 58, RFC 2579, April 1999.

   [RFC2580]  McCloghrie, K., Perkins, D., and J. Schoenwaelder,
              "Conformance Statements for SMIv2", STD 58, RFC 2580,
              April 1999.

   [RFC2629]  Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
              June 1999.

14.2.  Informative References

   [I-D.harrington-text-mib-doc-template]
              Harrington, D., "A Template for Documents Containing a MIB
              Module", draft-harrington-text-mib-doc-template-02 (work
              in progress), January 2007.

   [I-D.ietf-ippm-storetraceroutes]
              Niccolini, S., "Traceroute Measurements Information Model
              and XML Data Model", draft-ietf-ippm-storetraceroutes-03
              (work in progress), February 2007.

   [I-D.ietf-pce-disc-mib]
              Stephan, E., "Definitions of Managed Objects for Path
              Computation Element Discovery", draft-ietf-pce-disc-mib-00
              (work in progress), December 2006.

   [I-D.ietf-pce-manageability-requirements]
              Farrel, A., "Requirements for Manageability Sections in
              PCE Working Group Drafts",
              draft-ietf-pce-manageability-requirements-00 (work in
              progress), January 2007.




Stephan                   Expires July 21, 2007                [Page 22]

Internet-Draft           XML MIB Module Template            January 2007


   [I-D.muenz-ipfix-configuration]
              Muenz, G., "Configuration Data Model for IPFIX and PSAMP",
              draft-muenz-ipfix-configuration-01 (work in progress),
              December 2006.

   [RFC3410]  Case, J., Mundy, R., Partain, D., and B. Stewart,
              "Introduction and Applicability Statements for Internet-
              Standard Management Framework", RFC 3410, December 2002.

   [RFC4674]  Le Roux, J., "Requirements for Path Computation Element
              (PCE) Discovery", RFC 4674, October 2006.

   [RFC4742]  Wasserman, M. and T. Goddard, "Using the NETCONF
              Configuration Protocol over Secure SHell (SSH)", RFC 4742,
              December 2006.

   [StrKli03]
              Strauss and Klie, "Towards XML oriented Internet
              Management", 2003,
              <http://www.ibr.cs.tu-bs.de/papers/im-2003.pdf>.

   [XML]      "Extensible Markup Language (XML)", 2005,
              <http://www.w3.org/>.

   [xml2rfc-xxe]
              Fenner, "xml2rfc-xxe", 2005,
              <http://rtg.ietf.org/~fenner/ietf/xml2rfc-xxe/>.


Author's Address

   Stephan Emile
   France Telecom
   2 avenue Pierre Marzin
   Lannion,   F-22307

   Fax:   +33 2 96 05 18 52
   Email: emile.stephan@orange-ftgroup.com













Stephan                   Expires July 21, 2007                [Page 23]

Internet-Draft           XML MIB Module Template            January 2007


Full Copyright Statement

   Copyright (C) The IETF Trust (2007).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.


Acknowledgment

   Funding for the RFC Editor function is provided by the IETF
   Administrative Support Activity (IASA).





Stephan                   Expires July 21, 2007                [Page 24]