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 » Validate XML for Empty Elements in FileInput Node

Post new topic  Reply to topic
 Validate XML for Empty Elements in FileInput Node « View previous topic :: View next topic » 
Author Message
WMBDeveloper
PostPosted: Thu Aug 28, 2008 4:37 pm    Post subject: Validate XML for Empty Elements in FileInput Node Reply with quote

Newbie

Joined: 28 Aug 2008
Posts: 1

I'm using validation in a FileInput Node and I want XML messages with empty elements, e.g., <Name></Name>, to fail validation, not be processed and go to the backout folder.

In the FileInput Node, I've tried Input Message Parsing using both XMLNSC and MRM message domains.

In the Message Set, XML representation of null values is set to "NULLEmpty" for both Encoding Numeric/Non-Numeric Null.

Please advise.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Aug 29, 2008 12:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi,

Let me provide a couple of facts first:
- The XMLNSC domain does not use any information from the physical format. It uses only the schemas in the message set to validate the XML.
Aplogies if you knew that already.
- The null handling options in the MRM domain are independent of the validation logic. The point is, you won't fix the validation problem by altering the null handling options ( although you may want to set those options for other, valid reasons )

re: the validation, use XMLNSC. It is a very good implemenation of the W3C XML Schema standard. MRM has various non-standard behaviours.
XMLNSC will simply apply the rules in your schemas. So we could re-state your question as 'how do I design a schema which rejects an empty tag'.

The answer depends on what the elements should look like when they are not empty. If the element has child elements, set minOccurs > 0 on them. If it has a simple type with a limited range of values, put some enumerations on the simple type. Alternatively, set minLength to 1 on the simple type ( assuming that the simple type supports that ). As a last resort, all schema simple types support the Pattern facet.
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 » Validate XML for Empty Elements in FileInput Node
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.