|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Simple Type vs Element |
« View previous topic :: View next topic » |
Author |
Message
|
solomita |
Posted: Wed Feb 23, 2005 2:18 pm Post subject: Simple Type vs Element |
|
|
Voyager
Joined: 06 May 2003 Posts: 94
|
Can anyone clarify what a simple type is? For example, I am trying to determine why you would create a simple type of string vs. creating an element as a string if they are going to be global. _________________ IBM Certified Specialist - WebSphere MQ Integrator
IBM Certified System Administrator - WebSphere MQ V5.3
IBM Certified System Administrator - WebSphere Business Integration Message Broker V5 |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 24, 2005 1:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You don't say what version you're using, but I assume it's v2.1.
A 'simple type' of type string will result in an anonymous child node in the message tree. An element of type string creates a name/value node, which results in much simpler and clearer ESQL paths.
So you should use an element in almost all cases. Anonymous simple types are intended for modelling mixed content in XML documents. |
|
Back to top |
|
 |
solomita |
Posted: Thu Feb 24, 2005 4:57 am Post subject: |
|
|
Voyager
Joined: 06 May 2003 Posts: 94
|
Actually this is in V5. What do you mean by "modelling mixed content in XML documents." Can you give me an example of using a simple complex type string vs an element string.
Thanks _________________ IBM Certified Specialist - WebSphere MQ Integrator
IBM Certified System Administrator - WebSphere MQ V5.3
IBM Certified System Administrator - WebSphere Business Integration Message Broker V5 |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 24, 2005 7:08 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
In v5 you have no choice. If you want to model a simple string, you must create either an element or an attribute based on xsd:string (or a restriction of xsd:string).
I think you're confused about what a 'type' is. A type is an abstract description of a value. Simple types describe simple values. Complex types describe structures. However, you cannot represent a field in your message using only a simple type. You need to declare an element based on a simple type.
Similarly, you cannot represent a structure in your message using a complex type alone. You need to declare an element based on a complex type, and use that. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|