Page 1 of 1

Preferred number of repetitions: the same behavior for maxOccurs as for minOccurs

Posted: Mon Jan 14, 2013 9:36 pm
by tatra603
Hello,

I have on RFE. When using Generate Sample XML Files -> Options -> Settings -> Preferred number of repetitions, I would like to have some ability to generate maxOccurs element. As stated in "i" help:

n < minOccurs -> minOccurs
minOccurs < n -> n
n < maxOccurs -> n
maxOccurs < n -> n = THAT IS WHAT I DO NOT WANT TO HAVE IN RESULT, I WANT maxOccurs

Because I think, that in case maxOccurs < n -> n, the resulted XML would be invalid. In other words - it could be nice to have possibility to generate "largest XML as XSD allows" (and still valid XML).

Am I right? Thank You in advance for Your answer. Stepan

P.S. In "i" help is exactly written (the last statement is problem for me. And I do not know why that behavior was chosen. Maybe I missed something important regarding XML usage.

Option to set the preferred number of repeating elements related with minOccurs and maxOccurs defined in XML Schema.
If the value set here is between minOccurs and maxOccurs, that value will be used.
If the value set here is less than minOccurs, the minOccurs value will be used.
If the value set here is greater than maxOccurs, that value will be used.

Re: Preferred number of repetitions: the same behavior for maxOccurs as for minOccurs

Posted: Wed Jan 16, 2013 7:09 pm
by adrian
Hello,

So you are referring to the section Generate Sample XML Files from the documentation:
http://www.oxygenxml.com/doc/ug-editor/ ... rator.html
Preferred number of repetitions - Allows the user to set the preferred number of repeating elements related with minOccurs and maxOccurs facets defined in XML Schema.
- If the value set here is between minOccurs and maxOccurs, then that value is used;
- If the value set here is less than minOccurs, then the minOccurs value is used;
- If the value set here is greater than maxOccurs, then that value is used.
That's just a mistake in the documentation. I've checked in the code and if the value is greater than maxOccurs then maxOccurs is used.
Have you observed a different behavior in practice, or did you only notice this in the documentation?

Regards,
Adrian

Re: Preferred number of repetitions: the same behavior for maxOccurs as for minOccurs

Posted: Thu Jan 17, 2013 12:56 pm
by tatra603
Hello,

yeas, I read it in "fast documentation" ~ click on "i" sign in tool wizard. I did not nested then. I have tried it now and it works fine as I wanted.

Thank you. Stepan

Re: Preferred number of repetitions: the same behavior for maxOccurs as for minOccurs

Posted: Thu Jan 17, 2013 1:18 pm
by adrian
Hi,

I've submitted an issue for correcting this in our documentation (including the quick info from the dialog).

Regards,
Adrian