Oracle TopLink Developer's Guide
10g Release 3 (10.1.3) B13593-01 |
|
Previous |
Next |
TopLink Workbench uses the schema context to associate the XML descriptor reference class with a simple or complex type in one of the schemas associated with the XML project (see "Configuring XML Schema Reference"). This allows TopLink Workbench to display the appropriate attributes available for mapping in that context.
You must configure the schema context for an XML descriptor regardless of whether or not you are using TopLink Workbench.
The TopLink runtime uses the schema context to validate XML fragments.
To associate an XML descriptor with a specific schema complex type, use this procedure:
Select an XML descriptor in the Navigator. Its properties appear in the Editor.
Click the Descriptor Info tab. The Descriptor Info tab appears.
Figure 32-1 Descriptor Info Tab, Schema Context Option
Click Browse to select the schema element to associate with this descriptor. For more information, see "Choosing a Schema Context".
To configure an XML descriptor with a schema context using Java, create a descriptor amendment method (see "Configuring Amendment Methods") that uses XMLSchemaReference
method setSchemaContext
, as Example 32-1 shows.