You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
mapping XML schema for containment vs reference #22
The following two approaches have been discussed in the expert group
prior to the F2F.
1. JAXB 2.0 provides mechanisms which can be used to customize the
generated XML schema to allow a reference to an object to be
marshalled by containment or by reference.This approach has
issues - not user friendly (e.g. can result in for cycles), hard
to use etc. Nonetheless, this option does provide control to a
user for customizing the generated schema and was thought
worthwhile to explore this option further.
2. JAXB 2.0 determines based on the object graph the marshalling of
an object by containment or reference. For example, the first time
an object is marshalled, it is marshalled by
containment. Subsequent references of object are marshalled by
reference. This would be enabled by generating an XML schema with
a xs:choice that includes both an id or a reference to an id
(defined elsewhere). See the thread
The summary of this approach is: XML instance could just list
every single object at the top-level and all the references can be
ID/IDREF (since Java does not distinguish between containment
vs. reference). The generated XML schema might not be useful or
meaningful in some cases. In such a case, Java classes have to be
customized to produce the desired XML schema i.e. use approach 1
noted in bullet item 1 above.
Activity
glassfishrobot commentedon Apr 19, 2004
Reported by sekhar
glassfishrobot commentedon Apr 19, 2004
Was assigned to sekhar
glassfishrobot commentedon Apr 19, 2004
sekhar said:
Changed Issue type from "DEFECT" to "FEATURE"
glassfishrobot commentedon Jul 12, 2004
sekhar said:
Updating the status to follow the lifecycle issue outlined in the
jaxb20-note-0007.txt.
glassfishrobot commentedon May 11, 2017
This issue was imported from java.net JIRA JSR222-22