Subject: | Multiplicity error |
Distribution: XML::DTDParser-1.7
Perl version: Perl v5.8.0 built for cygwin-multi-64int
Operating System: Microsoft Windows XP Pro (CYGWIN_NT-5.1)
When the following DTD is parsed:
<!ELEMENT object (id, type, object*)>
<!ELEMENT id (id, type, type*)>
<!ELEMENT type (#PCDATA)>
Data::Dumper yields the following output for element 'id':
'id' => {
'childrenARR' => [
'id',
'type',
'type'
],
'parent' => [
'object',
'id'
],
'childrenSTR' => '(id, type, type*)',
'option' => '!',
'children' => {
'type' => '*',
'id' => '!'
}
}
However, it's clear from the DTD that the multiplicity of the 'type' child element should be '+' rather than '*' since there's at last one 'type' child element followed by zero or more others.
This is a show stopper for me at the moment. The solution could be to store the multiplicity in an array with the same order and size as the one that stores the 'childrenARR'.
Hope this helps, best regards,
Geert Jan Bex (-gjb-)