Skip Menu |

This queue is for tickets about the XML-Compile CPAN distribution.

Report information
The Basics
Id: 25337
Status: resolved
Priority: 0/
Queue: XML-Compile

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.16
Fixed in: (no value)



Subject: Reader dies with: Too few values (need 1) (0) ...
Hello Mark, with the script, schema and data file in the attached zip I get the following error: too few values (need 1) (0) for {http://foo/bar}feed/el(feed)/el(soon)/gr/mov The data file should be correct, xmllint tells me: $ xmllint -noout -schema test.xsd test.xml test.xml validates (BTW, the XML schema file was generated from a Relax NG file, test.rnc, using trang, but this should not crucial for the problem) Regards, Slaven
Subject: test.zip
Download test.zip
application/zip 1.1k

Message body not shown because it is not plain text.

The problem is with this: <xs:element name="soon"> <xs:complexType> <xs:group minOccurs="0" maxOccurs="unbounded" ref="bar:SoonRef"/> </xs:complexType> </xs:element> I have not implemented minOccurs/maxOccurs on groups (yet) Missed that from the spec. Thanks for the very clear test-case.
It took me 4 weeks of programming to change the whole processing of particles, but the results are very good. The problem is solved. With the following data: <feed xmlns="http://foo/bar"> <soon> <mov id-ref="100" /> <mov id-ref="101" /> </soon> </feed> you get {'soon' => { 'gr_mov' => [ { 'mov' => { 'id-ref' => bless({'value' => [100],'sign' => '+'}, 'Math::BigInt') } }, { 'mov' => { 'id-ref' => bless( {'value' => [101],'sign' => '+'}, 'Math::BigInt' ) } } ] }} because of two problems: repetative group needs an extra nesting, and the used type is integer, which must be able to contain 18 digits. With compile() option sloppy_integers => 1, you get {'soon' => { 'gr_mov' => [ { 'mov' => { 'id-ref' => 100 } }, { 'mov' => { 'id-ref' => 101 } } ] }};