users@jaxb.java.net

Re: UnrecognizedElementNameException

From: Kranthi Yemula <kyemula_at_ONCE.COM>
Date: Thu, 31 Oct 2002 14:53:01 -0800

Sorry! I forgot to specify which element is giving me trouble.

The element in problem is:
Exception in thread "main" javax.xml.bind.UnrecognizedElementNameException:
minNumItems

Thx,
Kranthi.

> -----Original Message-----
> From: Kranthi Yemula [mailto:kyemula_at_ONCE.COM]
> Sent: Thursday, October 31, 2002 2:44 PM
> To: JAXB-INTEREST_at_JAVA.SUN.COM
> Cc: Kranthi Yemula
> Subject: UnrecognizedElementNameException
>
>
> Hi,
>
> I am facing UnrecognizedElementNameException using JAXB1.0
> My DTD, XJS specifications eems to be fine and generate valid
> JAXB classes.
> Bu, I get problem during the unmarshal of xml.
> Please help.
>
> Thanks,
> Kranthi.
>
>
> Below are my dtd, xjs adn xml files.
>
> ----DTD-----
>
> !ELEMENT cicsRoot (collection*) >
> <!ELEMENT collection (catalog, minNumItems, query+, sort) >
> <!ATTLIST collection
> name CDATA #REQUIRED>
> <!ELEMENT catalog (#PCDATA) >
> <!ELEMENT minNumItems (#PCDATA) >
> <!ELEMENT sort (#PCDATA) >
> <!ATTLIST sort
> order CDATA #IMPLIED>
> <!ELEMENT query (where, maxNumItems) >
> <!ELEMENT where (#PCDATA) >
> <!ELEMENT maxNumItems (#PCDATA) >
>
> ---XJS--------
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
> <xml-java-binding-schema version="1.0-ea">
> <options package="com.once.jaguar.template.cics.jaxb"/>
>
> <element name="cicsRoot" type="class" root="true">
> </element>
>
> <element name="collection" type="class" root="true">
> <attribute name="name"/>
> <content>
> <element-ref name="catalog"/>
> <element-ref name="minNumItems"/>
> <element-ref name="query"/>
> <element-ref name="sort"/>
> </content>
> </element>
>
> <element name="query" type="class">
> <content>
> <element-ref name="where"/>
> <element-ref name="maxNumItems"/>
> </content>
> </element>
>
> <element name="sort" type="class">
> <attribute name="order"/>
> </element>
>
> <element name="catalog" type="value"/>
> <element name="minNumItems" type="value"/>
> <element name="where" type="value"/>
> <element name="maxNumItems" type="value"/>
>
> </xml-java-binding-schema>
>
> ------XML---------
>
> <?xml version="1.0" encoding="US-ASCII"?>
>
> <cicsRoot>
>
> <collection name="Menu Bar">
> <catalog>MENU_ITEMS</catalog>
> <minNumItems>9</minNumItems>
> <query>
> <where>content.MENU_NAME=_at_profile.DEPT@</where>
> <maxNumItems>9</maxNumItems>
> </query>
> <query>
> <where>content.MENU_NAME=Default</where>
> <maxNumItems>1</maxNumItems>
> </query>
> <sort order="R">content.PRIORITY</sort>
> </collection>
>
> <collection name="Feature News">
> <catalog>PRODUCTS</catalog>
> <minNumItems>9</minNumItems>
> <query>
> <where>content.DEPT=_at_profile.DEPT@</where>
> <maxNumItems>1</maxNumItems>
> </query>
> <query>
> <where>content.DEPT=Default</where>
> <maxNumItems>1</maxNumItems>
> </query>
> <sort order="A">content.PRIORITY</sort>
> </collection>
>
> </cicsRoot>
>
> ---------------END------------------
>