Posted: Sat Apr 14, 2007 3:12 pm Post subject: Importing xsd
Acolyte
Joined: 16 May 2001 Posts: 56
I am trying to import the following xsd as a part of a larger message set:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by David Keeley (private) -->
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Toby Williamson (TACIT Group Ltd) -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:element name="processable">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element ref="action"/>
<xsd:element ref="task"/>
<xsd:element ref="workflow"/>
</xsd:choice>
<xsd:element name="roles" type="rolesType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>The roles this user has</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="linkMap" type="linkMapType">
<xsd:annotation>
<xsd:documentation>A map which connects the possibility of a link from this UI action to another workflow.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="lang" type="xsd:string" use="required"/>
<xsd:attribute name="country" type="xsd:string" use="required"/>
<xsd:attribute name="database" type="xsd:string" use="required"/>
<xsd:attribute name="username" type="xsd:string" use="required"/>
<xsd:attribute name="nextId" type="xsd:long" use="required"/>
<xsd:attribute name="package" type="xsd:string" use="optional"/>
<xsd:attribute name="systemDate" type="xsd:date" use="optional"/>
<xsd:attribute name="systemCode" type="xsd:string" use="optional"/>
<xsd:attribute name="noTemplate" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="N"/>
<xsd:enumeration value="Y"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="debug" use="optional">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="N"/>
<xsd:enumeration value="Y"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="dateOffset" type="xsd:long" use="optional"/>
<xsd:attribute name="executionTime" type="xsd:long" use="optional"/>
<xsd:attribute name="actionId" type="xsd:long" use="optional"/>
<xsd:attribute name="taskId" type="xsd:long" use="optional"/>
<xsd:attribute name="workflowId" type="xsd:long" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="action" type="Action" abstract="true">
<xsd:annotation>
<xsd:documentation>This represents an Action as defined by an Action Template</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="task" type="Task" abstract="true">
<xsd:annotation>
<xsd:documentation>This represents a Task as defined by a Task Template</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="workflow" type="Workflow" abstract="true">
<xsd:annotation>
<xsd:documentation>This represents a Workflow as defined by a Workflow Template</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="Workflow">
<xsd:sequence>
<xsd:element name="request" type="Request"/>
<xsd:element ref="task" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="response" type="Response" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="package" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="Task">
<xsd:sequence>
<xsd:element name="request" type="Request"/>
<xsd:element ref="action" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="response" type="Response" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="package" type="xsd:string" use="optional"/>
<xsd:attribute name="taskId" type="xsd:long" use="optional"/>
<xsd:attribute name="workflowId" type="xsd:long" use="optional"/>
</xsd:complexType>
<xsd:complexType name="Action">
<xsd:annotation>
<xsd:documentation>Base type for all middle tier actions</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="request" type="Request"/>
<xsd:element name="response" type="Response"/>
</xsd:sequence>
<xsd:attribute name="package" type="xsd:string" use="optional"/>
<xsd:attribute name="actionId" type="xsd:long" use="optional"/>
<xsd:attribute name="taskId" type="xsd:long" use="optional"/>
<xsd:attribute name="workflowId" type="xsd:long" use="optional"/>
</xsd:complexType>
<xsd:complexType name="UIAction">
<xsd:annotation>
<xsd:documentation>Base type for all user interface actions</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="request" type="UIRequest"/>
<xsd:element name="response" type="UIResponse"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MultiResponseAction">
<xsd:annotation>
<xsd:documentation>Base type for an action that has 0..many responses, as would be suitable for starting 0..many batch jobs</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="request" type="Request"/>
<xsd:element name="response" type="Response" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Request"/>
<xsd:complexType name="Response">
<xsd:sequence>
<xsd:element name="messages" type="Messages"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UIRequest">
<xsd:sequence>
<xsd:element name="linkMap" type="linkMapType" minOccurs="0">
<xsd:annotation>
<xsd:documentation>A map which connects the possibility of a link from this UI action to another workflow.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="messages" type="Messages" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="UIResponse">
<xsd:sequence>
<xsd:element name="MessageAcknowledgements" type="MessageAcknowledgements" minOccurs="0">
<xsd:annotation>
<xsd:documentation>A list of the warning messages that have been acknowledged by a user in a UI action</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="confirmed" type="xsd:string" use="optional"/>
<xsd:attribute name="choice" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="MessageAcknowledgements">
<xsd:annotation>
<xsd:documentation>A list of the warning messages that have been acknowledged in the UI action by the user</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="code" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>This matches the code attribute on any message detail in the complex type Messages</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Messages">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="warning">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="detail" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="code" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="cause" type="xsd:long" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="error">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="detail" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="code" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="stackTrace" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="trace" type="xsd:string" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="cause" type="xsd:long" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="rolesType">
<xsd:sequence>
<xsd:element name="role" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="linkMapType">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="link">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="alias" type="xsd:string">
<xsd:annotation>
<xsd:documentation>The link alias name which can be used to hard code against in the UI action</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="destination" type="xsd:string">
<xsd:annotation>
<xsd:documentation>Fully qualified workflow name.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="permissionType" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="default" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
I am getting 3 warnings and am unable to put the msgset into a bar file - presumably because of the warnings.
These are:
The head element #action is abstract and has no substitutable members. Similarly for #task and #workflow.
I found a similar post last Jan (smdavies99) which advised (kimbert) removing the abstract elements. When I did this the xsd became invalid because theses elements are referenced in the xsd.
Is there another way around this problem?
Obviously through the "abstract" form you are referencing a definition that is not present in this file or any of it's imports....
The broker does not know how to solve this and replace the abstract form into it's implementation because it has neither implementation nor abstract form at hand...
In order to use the message set, importing this as a single file and not a part of a file set, you need to either resolve the abstract stuff or remove it.
Both of the references to 'action' are optional ( one is a member of a choice and the other has minOccurs==0 ). I suspect that none of your input messages actually contains this tag. If one of your input messages does include the tag <action> it will be invalid with respect to your schema.
I suggest that you remove <action> from your schemas and see what happens.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum