- From: Eddie Robertsson <eddie@allette.com.au>
- Date: Mon, 22 Oct 2001 11:00:38 +1000
- To: espen.dietrichs@Storebrand.no
- CC: xmlschema-dev@w3.org
Hi Espen,
> <!-- bankkonto.kontonumre -->
> <complexType name="bankkonto.kontonumre.input">
> <choice>
> <element name="deltjenestereferanse" type="tj:tjenestereferanseType
> "/>
> <group>
> <sequence>
> <element name="kontrollparametre" type="tj:kontrollparametreType
> " minOccurs="0"/>
> <element name="fn" type="felles:fn"/>
> </sequence>
> </group>
> </choice>
> </complexType>
You get an error in the above complexType because you're not allowed to declare
a group locally. If you want to decalre a new Group it needs to be declared
globally (immediate child of the xs:schema element) and it must also have a
"name" attribute. You can then reference a global group from within
complexTypes like this:
<xs:group ref="name of global group" ...>
However, in your case above it seems you only want to nest a sequence group
within a choice group so just remove your "group" declaration and it should
work fine. So, your complexType should be:
<!-- bankkonto.kontonumre -->
<complexType name="bankkonto.kontonumre.input">
<choice>
<element name="deltjenestereferanse" type="tj:tjenestereferanseType"/>
<sequence>
<element name="kontrollparametre" type="tj:kontrollparametreType"
minOccurs="0"/>
<element name="fn" type="felles:fn"/>
</sequence>
</choice>
</complexType>
Cheers,
/Eddie
Received on Sunday, 21 October 2001 20:54:27 UTC