Quoting Ed Mooney <Ed.Mooney_at_Sun.COM>:
> Hi Robert,
>
> The difference is that the sequence in folder is unbounded. The folder
> class should have a getFolderElems() returning a java.util.List.
Thanks!
That was the problem. Having the sequence unbounded and the group it includes
basically doing the same thing was a holdover from an old version of my schema
(bug...) and it shouldn't have been there. In other words, the elements in the
folder.elems group was already unbounded and the sequence in the folder element
was redundant. By removing it I get the getPageOrFolder() method for Folder.
Hooray!
FYI (not a big priority):
What happened originally was that when I called Site.getPageOrFolder() it
returned me a list of *all* folder and pages regardless of nesting. I thought
this was perhaps expected (I'm new to JAXB) and I went off looking for ways to
find the nesting structure information - there wasn't any.
I don't think my schema was invalid because it passed MSV, MSXML and XML Spy's
validators. Might this be a bug in JAXB? I realize that more care should have
been taken in my schema... Is it just my schema passed validation, but was not
correct according to JAXB because of my using:
....
<xs:sequence maxOccurs="unbounded">
<xs:group ref="lsb:folder.elems"/>
</xs:sequence>
....
<xs:group name="folder.elems">
<xs:sequence>
<xs:group ref="lsb:core.elems"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="lsb:page"/>
<xs:element ref="lsb:folder"/>
</xs:choice>
</xs:sequence>
</xs:group>
Thanks for spotting this (gets blurry sometimes...),
-Rob
>
> Regards,
> --
> Ed Mooney |Sun Microsystems, Inc.|Time flies like
> Java Web Services |UBUR02-201 |an arrow, but
> Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
> 781-442-0459 |Burlington, MA 01803 |a banana. Groucho
>
-------------------------------------------------
This mail sent through IMP:
http://horde.org/imp/