[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NGO] SMI and InetAddress modules for review




> <xs:simpleType name="ObjectIdentifier">
>  <xs:annotation>
>   <xs:documentation>OBJECT IDENTIFIER from RFC 2578, page 8.,
>                   libsmi v0.4.5 output.</xs:documentation>
>  </xs:annotation>
>  <xs:restriction base="xs:string">
>   <xs:pattern value="[0-2](\.(0|([1-9]([0-9]*))))*"/>
>   <xs:minLength value="2"/>
>   <xs:maxLength value="128"/>
>  </xs:restriction>
> </xs:simpleType>

Andy,

The bounds 2 and 128 are talking about subidentifiers, not string characters.  So I think you need something along the lines of this (where the value 1398 = 1 + (127 * (1 + 10))):

 <xs:simpleType name="ObjectIdentifier">
 <xs:annotation>
  <xs:documentation>OBJECT IDENTIFIER from RFC 2578, page 8.,
                  libsmi v0.4.5 output.</xs:documentation>
 </xs:annotation>
 <xs:restriction base="xs:string">
  <xs:pattern value="[0-2](\.(0|([1-9]([0-9]*))))+"/>
  <xs:minLength value="3"/>
  <xs:maxLength value="1398"/>
 </xs:restriction>
</xs:simpleType>

Whether schema validation against this maxLength is useful is another question entirely.


Regards,
Bob

Bob Moore
IBM Software Group Advanced Design & Technology
+1-919-254-4436
remoore at us.ibm.com
_______________________________________________
NGO mailing list
NGO at ietf.org
https://www1.ietf.org/mailman/listinfo/ngo