Hello Nadir,
Since you are currently reworking this area of code, i woukd like to
come back with my issue/question below.
My concerns result from the fact, that peek()ing for a nonexistent
optional elemen is not a noop (as it perhaps should be).
Rather it sets the member variable m_bPeeked (in the Xerces parser) to
true, which in turn implies a tendency in the parser to advance faster
(and depending on other factors perhaps too fast).
What i would like to ask you to do is
1. Make a specific test case for my scenario.
2. Analyze the reason for the presence of m_bPeeked.
Perhaps you can get rid of it in the course of your rework?
Cheers
Franz
Nadir Amra schrieb:
Hi Franz,
While I did not specifically test for that scenario, I believe the
solution will work. The tests I put in tests the following type coming in
as start/end element:
<s:complexType name="ArrayOfInfoString">
<s:attribute name="attributeA" type="s:string" use="optional"/>
<s:attribute name="attributeB" type="s:string" use="required"/>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="InfoString"
nillable="true">
<s:complexType name="InfoString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CodInfoString"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
And I see no reason why any number of optional elements would not work.
All optional element processing does a peek(), so peek will return NULL
string no matter the number of optional elements.
Nadir K. Amra
Franz Fehringer <[EMAIL PROTECTED]> wrote on 01/15/2007 04:49:51 AM:
Hallo Nadir,
Does the checked in fix correctly handle the case
<mytag mykey="myvalue"/>
where *two* (or more) optional elements are missing.
I was slightly concerned about this case(s) with my solution.
Cheers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
begin:vcard
fn:Dr. Franz Fehringer
n:Fehringer;Franz
org:ISO Software Systeme
adr;quoted-printable:;;Eichendorffstrasse 29;N=C3=BCrnberg;;90491;Deutschland
email;internet:mailto:[EMAIL PROTECTED]
tel;work:+49/(911) - 99594-0
tel;fax:+49/(911) - 99594-580
x-mozilla-html:TRUE
url:http://www.isogmbh.de/
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]