Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] SDO issue: xsd type hierarchy and substitution groups

Hi Fabio,

Thanks for bringing this to our attention, turns out there was a bug here.  I've checked a fix into 2.5.1 and 2.6, and it should be available in tonight's nightly build.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=412420

- Rick

 

From: Fabio Pignaton [mailto:pignaton@xxxxxxxxxx]
Sent: July-03-13 6:59 AM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] SDO issue: xsd type hierarchy and substitution groups

 

Dear all,

 

   working with EclipseLink SDO on BPMN 2.0 XSDs, we run into a possible issue regarding type hierarchy and element substitution group.

 

We attach to this mail an XSD and an XML file that allow one to see the after-mentioned issue. The type hierarchy defined by the XSD is the following:

 

tBase

   |--- tGeneric

   |--- tSubstitutable (abstract)

           |--- tSubstitute

 

Moreover, the XSD defines a substution group, i.e., it defines an element named substitutableElement of type tSubstitutable, and an element named substituteElement of type tSubstitute with substitutionGroup="substitutableElement".

 

The XML file define a root element with four children, one of type tGeneric, and three of type tSubstitute.

When unmarshaling the XML file using XMLHelper, only one of the three element of type tSubstitute is recognized as such, the other two are seen as tGeneric.

 

The attached image (result.png) shows the DataObject tree resulting from the unmarshaling of the XML file.

 

This issue seems to be caused by the hierarchy structure (both tGeneric and tSubstitute extends tBase) and the presence of the substitution group.

 

Note that changing the order of the elements in the XML file the unmarshaling result changes.

 

 

Best regards,

Fabio

 

--

 

 

Fabio Pignaton 
Software Architect
R&D group
ESTECO Srl - AREA Science Park, Padriciano 99 - 34149 Trieste - ITALY
Phone: +39 040 3756575 - Fax: +39 040 3755549 | www.esteco.com

 

Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.

Pursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. Thank you.

 



--
Rick Barkhouse | Software Developer, TopLink / EclipseLink | 613.288.4613
Oracle Development
45 O'Connor Street, Suite 400 | Ottawa, Ontario K1P 1A4

Back to the top