The API of SchemaProperty.getMaxOccurs() states: " * Returns the maxOccurs
value for this particle, or null if it * is unbounded." It's a design
choice. If we returned MAX_INT then we wouldn't e able to handle the case when
maxOccurs is > MAX_INT, right? If you are not worried about that case, just use
SchemaProperty.getIntMaxOccurs() which will indeed return MAX_INT for the
"unbounded" case. Fair enough?
Radu
________________________________
From: Ole Matzura [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2008 2:31 AM
To: [email protected]
Subject: SchemaProperty returning null for maxOccurs = unbounded
Hi!
I'm having an problem where a SchemaProperty retrieved with
getElementProperties() for an element with maxOccurs="unbounded" returns null
from getMaxOccurs().. shouldn't it return MAX_INT or something? The underlying
SchemaTypeSystem was created dynamically from an xsd with XmlBeans.compileXsd
and not from an precompiled jar/xsb (if that should matter..)
Thanks for any reply!
Regards,
/Ole
Eviware.com