users@jaxb.java.net

Re: cvc-elt.1: Cannot find the declaration of element. Unmarshaling nested el

From: skov <skov_at_inbox.ru>
Date: Wed, 20 May 2009 08:59:08 -0700 (PDT)

Thanks for the tip.
That is exactly what it is.
When I declare element as a top-level and use ref attribute to reference it
then it is valid but when it is described as a nested element it can't find
it.

Thank you


Wolfgang Laun-2 wrote:
>
> Does your XML schema define <twoelement> as a top-level element? If it
> occurs only as a child of <oneelment> it's not valid as a document on its
> own, i.e., the validator doesn't know that you are filtering things away.
> -W
>
> On Fri, May 15, 2009 at 11:11 PM, skov <skov_at_inbox.ru> wrote:
>
>>
>> Hi,
>> I stacked with Cannot find the declaration of element. erorr
>> when I enable validation on jaxb.
>> I have valid XML document against schema.
>> I have no problem unmarshaling whole document with validation.
>> But I am trying to unmarshal only specific element inside xml file.
>> For example i have
>> <xml>
>> <oneelement>
>> <twoelement>
>>
>> </twoelement>
>> </oneelement>
>> </xml>
>>
>> So I am filtering events and only unmarshal twoelemet element.
>> It works fine without validation but when I enable validation setting
>> schmea
>> to Unmarshaller it throws that cvc-elt.1: Cannot find the declaration of
>> element. twoelement.
>>
>> Any suggestions please
>> --
>> View this message in context:
>> http://www.nabble.com/cvc-elt.1%3A-Cannot-find-the-declaration-of-element.-Unmarshaling-nested-el-tp23567358p23567358.html
>> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
>

-- 
View this message in context: http://www.nabble.com/cvc-elt.1%3A-Cannot-find-the-declaration-of-element.-Unmarshaling-nested-el-tp23567358p23638351.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.