XJC fails with attribute named as component · Issue #2 · javaee/jaxb-v2 (original) (raw)

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.

@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"/>





-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)]