A number of features in XML Schema are not supported, or their support is restricted in some way.
When importing an XML Schema into a message set that supports namespaces, the Redefine construct is accepted, but causes an error message to be displayed in the task list because it is not fully supported.
The following XML shows an example of the Redefine construct:
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ibm.com" xmlns:ibm="http://www.ibm.com"> <!-- Unsupported feature: redefine --> <redefine schemaLocation="test.xsd"/> </schema>
When importing an XML Schema into a message set that supports namespaces, the constructs below are accepted, but will be ignored and will not be deployed to the broker. When the user tries to import a schema containing one or more of these constructs, a warning is issued stating that they will be ignored. You will be able to delete these constructs, but there are no properties that can be configured for them.
These schema declarations are listed below:
The following XML shows an example of each of these constructs:
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ibm.com" xmlns:ibm="http://www.ibm.com"> <!-- Accepted feature: unique --> <element name="element1" type="string"> <unique name="unique1"> <selector xpath="path1"></selector> <field xpath="path1"></field> </unique> </element> <!-- Accepted feature: key --> <element name="element2" type="string"> <key name="key1"> <selector xpath="path1"></selector> <field xpath="path1"></field> </key> </element> <!-- Accepted feature: keyref --> <element name="element3" type="string"> <keyref name="keyref1" refer="ibm:key1"> <selector xpath="path1"></selector> <field xpath="path1"></field> </keyref> </element> </schema>
The problem occurs when an XML schema that has a target namespace, includes another XML schema that has no target namespace. The Schema Location created in the message model for the include just specifies the filename. This specification does not take into account that the including and included message definition files are in different directories within the message model.
You can fix the problem from the workbench by selecting the Properties tab of the including message definition file in the Message Definition Editor. Delete the include entry with the incorrect Schema Location then add another include entry, selecting the correct file from the file menu.
The list of constructs and the action taken is the same as for a message set with namespace support, as described above.
When importing an XML schema into a message set that does not support namespaces, you cannot import a schema document that has a target namespace that is not qualified with a prefix. For example:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ibm.com" xmlns="http://www.ibm.com"> </xsd:schema>