xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <regis...@it-xpert.be>
Subject Access multiplicity in schematype
Date Mon, 11 Dec 2006 15:18:12 GMT


I would like to know how to access the multiplicity property for an element.
Let suppose that I have an xmlbeans object called obj1. I can call method obj1.schemaType().getProperties().
I will get an array of SchemaProperty and I could find out for sub-element what's their multiplicity
(0..1, 1, 0..infinite ...) using methods getMinOccurs() and getMaxOccurs().
But this is valid for sub-elements.
I would like to get this info for the current element (obj1). In the parent context what's
the bounds for obj1 ?
It seems that the info is not accessible using this techniques. Using debugger and inspecting
schelmatype I see that minOccurs and maxOccurs are always equals to 1 !?
Or should I go back to parent ? (this is not very helpful because in my algorithm I assume
obj1 is like a root, only looking at child elements)

Can someone gives me some light on this ?

I need this for an xml comparison algorithm, and I would like to make distinction on matching
rule depending if the element is optional or mandatory (that's why I am trying to get info
about bounds)


To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

View raw message