[xsd-users] RE: parser issue
Rizzuto, Raymond
Raymond.Rizzuto at sig.com
Mon Jul 14 16:24:21 EDT 2008
Boris,
Thanks, I knew there were limitations in the validation, but was
surprised that in the case of a choice it actually serialized both
choices that I incorrectly populated.
I actually am parsing the serialized code, which is where I noticed the
error message ":43:16 error: Element 'simpleOrder' is not valid for
content model: '(request|order)'". One of our XML experts was able to
identify the error in the generated XML, luckily, as I was
misinterpreting what the error message was saying.
Ray
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: Monday, July 14, 2008 4:08 PM
To: Rizzuto, Raymond
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] RE: parser issue
Hi Ray,
Rizzuto, Raymond <Raymond.Rizzuto at sig.com> writes:
> I am a bit concerned that it was so easy to generate invalid output,
> however. Why didn't the serialize call throw an exception indicating
> this error?
The C++/Tree mapping does not perform validation during serialization.
As I mentioned earlier, we are working on another C++/Tree-like mapping
which will support validation in generated code for both parsing and
serialization.
There is also a work-around for this in C++/Tree which involves
re-parsing the serialized XML to make sure it is valid. For more
information please see the following post:
http://www.codesynthesis.com/pipermail/xsd-users/2008-June/001793.html
Boris
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
More information about the xsd-users
mailing list