Hi, attached are three forms of the RELAX NG schema equivalent to Hideki's diffserv data model: 1. XML form - diffserv.rng 2. Compact form - diffserv.rnc, transformed from diffserv.rng by trang 3. Cross-linked HTML - diffserv.html, obtained directly from diffserv.rng by a XSLT script that I wrote. This annotation system uses the <a:rest> elements embedded in the schema (it is documented in this technical report: http://www.cesnet.cz/doc/techzpravy/2006/rngrest/) I fixed one minor thing that IMO is not correct in the XSD schema - if the SrcPrefixLength and DstPrefixLength elements (in classifierUnit) are specified, then the respective SrcAddress nad DstAddress must also be present. Another example of a real-world RELAX NG schema intended for netconf is here: http://www.flowmon.org/flowmon-probe/devel/config/flowmon-rng/ Lada OKITA Hideki píše v Po 19. 03. 2007 v 00:19 +0900: > Dear NGO members, > > > I wrote a draft for the startpoint of NETCONF datamodel discussion. > > Title : A NETCONF Datamodel for Diff-Serv QoS Control Configuration > Author(s) : H. Okita, T. Iijima and Y. Atarashi > Filename : draft-okita-ngo-diffservdatamodel-00.txt > Pages : 22 > Date : 2007-2-27 -- Ladislav Lhotka, CESNET PGP Key ID: E74E8C0C
Attachment:
diffserv.html
Description: application/xml
default namespace = "http://netconfcentral.org/ncx"
namespace a = "http://www.cesnet.cz/ns/rngrest-annotations/1.0"
datatypes d = "http://www.netconfcentral.org/ncx/ncx"
start = element diffServ { diffServ-content }
[
a:rest [
"\x{a}" ~
"This attribute is used with the elements that are targets for links. \x{a}" ~
" "
]
]
name-attribute = attribute name { xsd:ID }
[
a:rest [
"\x{a}" ~
"Differentiated Services Code-Point may be used for marking a traffic\x{a}" ~
"stream. \x{a}" ~
" "
]
]
dscp-element = xsd:nonNegativeInteger { maxInclusive = "63" }
[
a:rest [
"\x{a}" ~
"This pattern defines the *content* of an element that serves as a\x{a}" ~
"link. Unlike link targets (cf. `name-attribute`_), such elements have\x{a}" ~
"different names.\x{a}" ~
" "
]
]
idref-content = xsd:IDREF
diffServ-content =
element dataPath { dataPath-content }+,
element classifier { classifier-content }*,
element meter { meter-content }*,
element marker { marker-content }*,
element scheduler { scheduler-content }*,
element dropper { dropper-content }*
classifier-content =
name-attribute,
element classifierUnit { classifierUnit-content }+
dataPath-content =
name-attribute,
element ifIndex { xsd:nonNegativeInteger },
element ifDirection { "in" | "out" },
element startElement { idref-content }
classifierUnit-content =
name-attribute,
element addrType { d:InetAddressType }?,
(element SrcAddr { d:InetAddressType },
element SrcPrefixLength { d:InetAddressPrefixLength }?)?,
(element DstAddr { d:InetAddressType },
element DstPrefixLength { d:InetAddressPrefixLength }?)?,
dscp-element?,
element Protocol {
xsd:string { maxLength = "255" }
}?,
element DstL4PortMin { d:InetPortNumber }?,
element DstL4PortMax { d:InetPortNumber }?,
element SrcL4PortMin { d:InetPortNumber }?,
element SrcL4PortMax { d:InetPortNumber }?,
element nextElement { idref-content }?
marker-content =
name-attribute,
dscp-element,
element nextElement { idref-content }
meter-content =
name-attribute,
element threshold { threshold-content }*,
element nonConformOutputElement { idref-content }
scheduler-content =
name-attribute,
element schedulingMethod { "Priority" | "WRR" | "WFQ" },
element queueDropMethod { "taildrop" | "WRED" },
element queue { queue-content }+,
element endElement { idref-content }
queue-content =
name-attribute,
element priority { xsd:int }
dropper-content = name-attribute
threshold-content =
element rate {
xsd:string { pattern = "\d+[GMKk]?bps" }
},
element nextElement { idref-content }
Attachment:
diffserv.rng
Description: application/xml
_______________________________________________ NGO mailing list NGO at ietf.org https://www1.ietf.org/mailman/listinfo/ngo