users@jaxb.java.net

Re: (Issue 29) how to ignore an error during partial unmarshalling

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 29 Sep 2004 12:50:19 +0200

Hi.

> thanks for the information - i had annotations attached globally, and
> also on two elements in the xsd that is causing me trouble but in my
> case, removing these does not solve the problem..
>
> I tried commenting them out but am still getting the XML validation
> errors - bizarrely on an element that never has had any annotation:
>
>
> <xsd:complexType name="VAR">
>
> <xsd:attribute name="n" type="xsd:string" use="required"/>
>
> <xsd:attribute name="v" type="xsd:string" use="required"/>
>
> </xsd:complexType>
>
>
>
> I've very little understanding of the classes that JAXB generates, but
> it seems that the problem is somewhere in them (?) - Xerces seems to
> legitimately report that the element has ended, but i think there is
> possibly something wrong with the generated state machine (which seems
> to track where parsing has got to within the element) inside the VAR's
> parent?

I'm sure my message won't help you much, I just want to share my
experience with partial unmarshalling.

I'm actually also interested in such a thing: for instance for "document
templates" which would ease editing XML documents. I've played with JAXB
RI validation some time ago and did not succeed to unmarshall an
incomplete/invalid document. I have hade similar issues: unexpected end
of element and so on. The problem seems to be in "states" of
unmarshaller: if element unmarshalling is comehow breaken, the state
does not change correctly and defaults to "unexpected end" behaviour. So
this is, strictly speaking not validation but unmarshalling error.
I am not sure that partial unmarshalling is supported by JAXB RI and
would be grateful if someone could clear this out for us.

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net