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 as it is not fully supported.
The following is 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.
If you extract the logical model for the message (for example using the Schema Generation facility) these constructs are ignored and are not included in the output schema.
The following is a list of these schema declarations:
The following is 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 does not take into account that the including and included message definition files are in different directories within the message model.
You can fix 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 user has the choice to accept, reject or modify these constructs based on the preferences set by the user in the XML Schema Importer preference page (or the mqsicreatemsgdefs import options file).
If the user specifies "reject", when the construct is encountered, the import stops and an error is reported.
If the user specifies "modify" (the default), when the construct is encountered, the importer modifies the resulting message definition file as follows:
Note that these modifications are the equivalent modifications that were performed by the Version 2.1 XML Schema importer command, for compatibility.
If the user specifies "accept", when the construct is encountered, the importer imports the construct as it is. This may result in task list errors depending on the construct, as described above for message sets with namespace support.
The following is 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"> <!-- Supported feature: redefine --> <redefine schemaLocation="test.xsd"/> <!-- Supported feature: import --> <import schemaLocation="test1.xsd" namespace="http://www.ibm1.com"/> <!-- Supported feature: list --> <simpleType name="type1"> <list itemType="string" /> </simpleType> <!-- Supported feature: union --> <simpleType name="type2"> <union memberTypes="string" /> </simpleType> <!-- Supported feature: abstract complex type --> <complexType name="type3" abstract="true"></complexType> <!-- Supported feature: abstract element --> <element name="element" type="string" abstract="true"></element> </schema>
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>
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ad15870_ |