Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

XJC fails with attribute named as component #2

Closed
@glassfishrobot

Description

@glassfishrobot

XJC fails when there is an element that has attribute named as "Content" in the
schema to be compiled. Here's an example of from IOTP schema:

-cut-
<xs:element name="PackagedContent">
<xs:complexType mixed="true">
<xs:attribute name="Name"/>
<xs:attribute name="Content" default="PCDATA" type="xs:NMTOKEN"/>
<xs:attribute name="Transform" default="NONE">
xs:simpleType
<xs:restriction base="xs:token">
<xs:enumeration value="NONE"/>
<xs:enumeration value="BASE64"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
-cut-

XJC outputs:

-cut-
compile-xml:
[echo] Compiling the IOTP schema..
[xjc] Compiling file:/home/jyrki/cvs/Engineering/IOTPAdapter/iotp.xsd
[xjc] [ERROR] A property with the same name "Content" is generated from
more than one schema component.
[xjc] line 117 of iotp.xsd
-cut-

Environment

Operating System: All
Platform: All

Affected Versions

[JWSDP1.3 (JAXB1.0.2)]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions