Creating The Junos.xsd File - Juniper JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010 Manual

Junos xml management protocol guide
Hide thumbs Also See for JUNOS OS 10.3 - XML MANAGEMENT PROTOCOL GUIDE 6-30-2010:
Table of Contents

Advertisement

Creating the junos.xsd File

Copyright © 2010, Juniper Networks, Inc.
running on the device. The schema does not indicate which elements are actually
configured, or even that an element can be configured on that type of device (some
configuration statements are available only on certain device types). To request the set
of currently configured elements and their settings, emit the
element instead, as described in "Requesting Configuration Information" on page 64.
Explaining the structure and notational conventions of the XML Schema language is
beyond the scope of this document. For information, see XML Schema Part 0: Primer,
available from the World Wide Web Consortium (W3C) at
http://www.w3.org/TR/xmlschema-0/
the formal specifications where you can find detailed information.
For further information, see the following sections:
Creating the junos.xsd File on page 95
Example: Requesting an XML Schema on page 96
Most of the tag elements defined in the schema returned in the
to the default namespace for Junos OS configuration elements. However, at least one
tag,
<junos:comment>
, belongs to a different namespace:
http://xml.juniper.net/junos/Junos-version/junos
only one namespace, so schema validators need to import information about any
additional namespaces before they can process the schema.
In Junos OS Release 6.4 and later, the
tag element and references the file
<xsd:schema>
information about the
junos
element specifies the file for Junos OS Release 10.3R1 (and appears on two lines for
legibility only):
<xsd:import schemaLocation="junos.xsd" \
namespace="http://xml.juniper.net/junos/10.3R1/junos"/>
To enable the schema validator to interpret the
manually create a file called
contains the complete Junos configuration schema. Include the following text in the file.
Do not use line breaks in the list of attributes in the opening
appear in the following example for legibility only. For the
the release number of the Junos OS running on the device (for example,
first release of Junos OS 10.3).
<?xml version="1.0" encoding="us-ascii"?>
<xsd:schema elementFormDefault="qualified" \
attributeFormDefault="unqualified" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
targetNamespace="http://xml.juniper.net/junos/Junos-version/junos">
<xsd:element name="comment" type="xsd:string"/>
</xsd:schema>
. The primer provides a basic introduction and lists
. By XML convention, a schema describes
tag element is enclosed in the
<xsd:import>
junos.xsd
namespace. For example, the following
<xsd:import>
in the directory where you place the
junos.xsd
Chapter 4: Requesting Information
tag
<get-configuration>
tag belong
<xsd:schema>
, which contains the required
<xsd:import>
tag element, you must
file that
.xsd
<xsd:schema>
tag. Line breaks
variable, substitute
Junos-version
for the
10.3R1
tag
95

Advertisement

Table of Contents
loading

This manual is also suitable for:

Junos os

Table of Contents