You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Alexey Loubyansky <al...@jboss.org> on 2004/01/07 22:13:32 UTC

complexType with simpleContent

Is the following a not allowed type definition?

  <xs:complexType name="authorType">
     <xs:simpleContent>
        <xs:extension base="xs:string">
           <xs:attribute name="rating" type="xs:string"/>
        </xs:extension>
     </xs:simpleContent>
  </xs:complexType>

This is an attempt to define a type for
<author rating="high">Author Name</author>

I get
java.lang.IllegalStateException: This complex type doesn't have a model
group particle.
	at
org.apache.ws.jaxme.xs.impl.XSTypeImpl$XSSimpleContentImpl.getParticle(X
STypeImpl.java:196)

Thanks.

Alexey

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: complexType with simpleContent

Posted by Jochen Wiedmann <jo...@ispsoft.de>.
Hi, Alexey,

Alexey Loubyansky wrote:

>   <xs:complexType name="authorType">
>      <xs:simpleContent>
>         <xs:extension base="xs:string">
>            <xs:attribute name="rating" type="xs:string"/>
>         </xs:extension>
>      </xs:simpleContent>
>   </xs:complexType>
> 
> This is an attempt to define a type for
> <author rating="high">Author Name</author>
> 
> I get
> java.lang.IllegalStateException: This complex type doesn't have a model
> group particle.
> 	at
> org.apache.ws.jaxme.xs.impl.XSTypeImpl$XSSimpleContentImpl.getParticle(X
> STypeImpl.java:196)

I was unable to reproduce your problem with the latest CVS version. Found 
some errors in the code handling simpleContent, though. A fix is committed.
See src/test/jaxb/types.xsd and
MarshallerTest.test(Un|M)arshalSimpleContent().


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org