[opencms-dev] schema recursion ....
Ruben Malchow
ruben at disk0.de
Wed Jun 30 02:40:27 CEST 2010
hi,
i was wondering why it is that i get a stackoverflowerror when i try to
do this:
<xsd:element name="NestedTrees" type="OpenCmsNestedTrees"/>
<xsd:complexType name="OpenCmsNestedTrees">
<xsd:sequence>
<xsd:element
name="NestedTree"
type="OpenCmsNestedTree"
minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsNestedTree">
<xsd:sequence>
<xsd:element
name="name"
type="OpenCmsString"
minOccurs="1"
maxOccurs="1" />
<xsd:element
name="nested"
type="OpenCmsNestedTree"
minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute
name="language"
type="OpenCmsLocale"
use="optional"/>
</xsd:complexType>
to me, it seems unnecessary to actually dive into that nested element,
because we should know it at that point. and the _actual_ depth of the
nesting could then be determined by just how many things you actually
put in the content?
maybe there is a fundamental flaw in my thinking, though.
:/
.rm
More information about the opencms-dev
mailing list