[Xml-compile] Elements with maxOccurs="100"

Zbigniew Lukasiak zzbbyy at gmail.com
Mon Nov 24 12:27:16 GMT 2008


On Mon, Nov 24, 2008 at 1:20 PM, Mark Overmeer <mark at overmeer.net> wrote:
> * Zbigniew Lukasiak (zzbbyy at gmail.com) [081124 12:07]:
>>
>> This was my mistake in copy-pasting.  I've tried many versions - but
>> this is not relevant.
>
> It is relevant for me to understand your question.  There is something
> fishy, but it does not fix your problem.  It still looks like a syntax
> error in your test, sorry.
>

Yes - that was a syntax error. It was created when I copied the text
from my files to the email.  I hope this is now explained.

>> > Another suspectable thing is that you use "nillable"... which means that
>> > "undef"s will get encoded into xsi:nil attributes.  You really need that?
>>
>> Thanks - this was the problem!  I changed nillable to 'false' and now
>> it works.  I think that with nillable="true" it expected a 100
>> elements array - maybe it is a good idea for a more explicite error
>> message.
>
> I tried this:
>
>  in the schema:
>  <element name="test3">
>   <complexType>
>    <sequence>
>       <element name="e3" type="int" minOccurs="0" maxOccurs="12"
>           nillable="true" />
>    </sequence>
>   </complexType>
>  </element>
>
>  in Perl:
>   { e3 => [ 'NIL', 42, 'NIL', 43, 'NIL' ]}
>
>  in XML:
>  <test3 xmlns:xsi="$xsi">
>   <e3 xsi:nil="true"/>
>   <e3>42</e3>
>   <e3 xsi:nil="true"/>
>   <e3>43</e3>
>   <e3 xsi:nil="true"/>
>  </test3>
>
> The writer produced the wrong output.  This will be fixed in 0.97, to
> be released later today.  But it is not the error you get.

Try a complex type instead of just int (for the e3 element).  I can
also recreate my test - if you have problem with getting this error
message.

Thaks again,
Zbigniew



More information about the Xml-compile mailing list