
On Fri, Nov 02, 2007 at 04:12:54PM +0100, Arndt Jonasson wrote:
In the file tools/fortopat.c is this code:
for (range = smiRange, lp = 0; range; range = smiGetNextRange(range)) { lengths[lp++] = smiRange->minValue.value.unsigned32; lengths[lp++] = smiRange->maxValue.value.unsigned32;
This ought to be
for (range = smiRange, lp = 0; range; range = smiGetNextRange(range)) { lengths[lp++] = range->minValue.value.unsigned32; lengths[lp++] = range->maxValue.value.unsigned32;
or the ranges after the first one will effectively be ignored.
Thanks and fixed in the SVN.
Note that the format string to xsd pattern translation algorithm is actually broken and needs to be rewritten. This became clear when I started to add support for YANG; so I assume that not many people really have actually used the XSD mapping since we never received a bug report that the translation generates broken XSD (in the sense that you can't use it to validate instance documents).
/js