[Nml-wg] Labels
Roman Łapacz
romradz at man.poznan.pl
Fri Apr 27 08:19:51 EDT 2012
Hi,
the final proposal how the labels could look like is as follows (RNC
format):
Label =
element nml:label {
element nml:parameter {
attribute name { "type" }&
text
}&
(
element nml:parameter {
attribute name { text }&
text
} +
) |
anyElement+
} +
### taken from nmc base schema
anyElement = element * {anyThing }
anyAttribute = attribute * { text }
anyThing =
(
anyElement |
anyAttribute |
text
)*
an example:
<nml:label>
<nml:parameter name="type">c-vlan</nml:parameter>
<nml:parameter name="value>42</nml:parameter>
</nml:label>
<nml:label>
<nml:parameter name="type">wavelength</nml:parameter>
<nml:parameter name="unit">nm</nml:parameter>
<nml:parameter name="spacing">25GHz</nml:parameter>
<nml:parameter name="value">1500</nml:parameter>
</nml:label>
By default, other nemaspaces than nml basic one are not needed but I
would not forbid them. Use of a set of nml:parameter elements (flat
structure) seems to be enough flexible to cover almost all possible
cases but I can imagine a very rare requirement to have a nested
structure inside nml:label, for example:
<nml:label>
<nml:paremeter name="type">xyz</nml:parameter>
<nml-ext:something_1>
<nml-ext:something_2>
...
</nml-ext:something_2>
</nml-ext:something_1>
</nml:label>
(that is why I've added anyElement in the RNC snippet)
If you are 100% sure that such a requirement will not come up I'm fine
to remove this extension possibility.
Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/nml-wg/attachments/20120427/8f6a35dd/attachment.html>
More information about the nml-wg
mailing list