ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XMLNSC conforms to XSD spec?

Post new topic  Reply to topic
 XMLNSC conforms to XSD spec? « View previous topic :: View next topic » 
Author Message
lancelotlinc
PostPosted: Mon Jul 09, 2012 12:49 pm    Post subject: XMLNSC conforms to XSD spec? Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

WMB 7.0.0.3


I have an XSD that specifies an xsd:boolean for a particular field. If I use an ESQL BOOLEAN to represent that, as represented in Trace file, the XMLNSC parser serializes that value as an uppercase representation which is non-conformant to the XSD specification.

http://www.schemacentral.com/sc/xsd/t-xsd_boolean.html



Quote:
Valid values
true
false
0 false
1 true
.
Invalid values
TRUE values are case sensitive
T the word "true" must be spelled out
an empty value is not valid, unless xsi:nil is used


The proper representation of a boolean per the XSD format must be lower case not uppercase; however, the output of the XMLNSC parser is represented as uppercase. When serializing through a SOAPRequest node, does the XMLNSC parser conform to the XSD spec and make the boolean lowercase? A business analyst is challenging my code because the analyst sees my Trace file logs and the value is uppercase in those logs. I want to say that the XMLNSC parser when it parses for the SOAPRequest node properly complies with the XSD format spec. Am I right?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Mon Jul 09, 2012 12:58 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

A very good question and one that Kimbert might answer but as always, to get an official answer, raise a PMR!
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 09, 2012 2:18 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

A very good question, and one that I'm very happy to answer. The short answer is "Yes, XMLNSC does the right thing when it parses and writes the XML document". XMLNSC is very close to 100% conformant with the XML Schema specification, which makes it somewhat more accurate than most of the well known XML parsers.

Now for the technical stuff. What you see in the Trace file, or in a user trace, is the logical representation of your data. The type system for the message tree is ESQL's type system. In this type system. a BOOLEAN has values 'TRUE' and 'FALSE'. The XMLNSC parser automatically translates between the ESQL and XML Schema type systems. So XMLNSC will always output the correct lexical representation of any XML Schema type. Since the SOAPRequest node uses XMLNSC internally, it will do the same.

The old XML parsers ( XML, XMLNS and MRM XML ) all use the ESQL type system when outputting XML. Another good reason not to use them.

This nicely illustrates a key distinction between WMB and most other 'ESB' products. WMB enforces a genuine distinction between the physical and logical representations of data. This requires a little bit of mental adjustment for some people, but it is a powerful concept and it helps to give WMB a very wide reach (because it is not tied to a single type system). Your business analyst may or may not find that interesting.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jul 09, 2012 10:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kimbert wrote:
Your business analyst may or may not find that interesting.


This could be written

Your business analysyt may find that understanding this concept NOT very easy.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 10, 2012 1:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Not sure what point you're trying to make ( if any ) but WMB is not alone in using this technique. Unicode does exactly the same trick with characters. A Unicode code point is a logical representation of a character. Any Unicode character can have a large number of alternative physical representations ( encodings ).
I've noticed that a lot of people struggle with Unicode concepts. But Unicode is a very good way to deal with character encodings and WMB is a very good way to deal with data formats.
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jul 10, 2012 6:04 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Thanks kimbert for the info. This information helps me properly and accurately address the concern.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Tue Jul 10, 2012 6:18 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kimbert wrote:
Not sure what point you're trying to make ( if any )


In a recent conversation with a BA I spoke at length about the advantages of the abstracted model and why I thought it was good that I didn't have to worry that much about the output format until the data reached the boundary of Broker.
His response was very negative. 'Why does it matter?'
I explained that in our business area interfaces are changing all the time even if you have a signed off spec, come integration time it might be the wrong one. It is easy for us to change our interface. I had to so so only last month on the eve of UAT. Another vendor had decided that they weren't doing to play MQ but TCP/IP instead. My change took less time that it took the admins to open up the firewall port for the TCP connection. He still didn't get it.

_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 10, 2012 6:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I probably would have made an analogy about a change in the shape of the road and a change in the shape of the tires on one's car.

If you can't change the tyres without changing the axle, it's one thing....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XMLNSC conforms to XSD spec?
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.