xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Pytel (JIRA)" <xmlbeans-...@xml.apache.org>
Subject [jira] Commented: (XMLBEANS-381) Generated source files for nested simple enumeration type does not compile - "cannot find symbol org.apache.xmlbeans.XmlString.Enum"
Date Fri, 05 Sep 2008 15:42:44 GMT

    [ https://issues.apache.org/jira/browse/XMLBEANS-381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628657#action_12628657
] 

David Pytel commented on XMLBEANS-381:
--------------------------------------

Proposed patch extracts from printStringEnumeration method code that checks if type has a
enum base type to seperate method. Then using this hasBase(..) method, the appropriate type
is chosen in javaTypeForProperty method.

> Generated source files for nested simple enumeration type does not compile - "cannot
find symbol org.apache.xmlbeans.XmlString.Enum"
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: XMLBEANS-381
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-381
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Binding
>    Affects Versions: TBD
>         Environment: Any
>            Reporter: David Pytel
>            Priority: Minor
>         Attachments: patch_for_XMLBEANS-381.patch
>
>
> Generated source files for xsd below does not compile:
> ***************************************************
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 	<xsd:simpleType name="someAttributeType">
> 		<xsd:restriction>
> 			<xsd:simpleType>
> 				<xsd:restriction base="xsd:string">
> 					<xsd:enumeration value="aaaaa" />
> 					<xsd:enumeration value="bbbbb" />
> 					<xsd:enumeration value="ccccc" />
> 					<xsd:enumeration value="ddddd" />
> 					<xsd:enumeration value="eeeee" />
> 				</xsd:restriction>
> 			</xsd:simpleType>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> 	<xsd:complexType name="SomeComplexType">
> 		<xsd:attribute name="attr" type="someAttributeType"/>
> 	</xsd:complexType>
> </xsd:schema>
> ***************************************************
> Compilation error message:
> ***************************************************
> C:\projects\workspace-opensource\TestsForXmlBeansBugs\.\srcgen\noNamespace\SomeComplexType.java:24:
cannot find symbol
> symbol  : class Enum
> location: interface org.apache.xmlbeans.XmlString
>     org.apache.xmlbeans.XmlString.Enum getAttr();
> .... and so on
> ***************************************************
> Xsd file is valid according to http://www.w3.org/2001/03/webdata/xsv validator.
> One may ask if it makes sense - unfortunately I must work with a schema with similiar
constructs:
> http://crd.gov.pl/xml/schematy/adres/2008/05/09/adres.xsd
> This problem occurs in xmlbeans 2.4.0 (there is no such a version to choose when creating
bug so I've chosen TBD) and current trunk from svn repo.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message