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 » How to creating generic CSV with repeating elements

Post new topic  Reply to topic
 How to creating generic CSV with repeating elements « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Fri Jul 17, 2009 6:46 am    Post subject: How to creating generic CSV with repeating elements Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hi,

I'm trying to create a msgset that defines a generic CVS with unknown number of repeats. specifically, I want to model a message that can accommodate the following syntax:

ServiceName,parm1,parm2,parm3,...,parmN, with N unknown, only ServiceName is manditory.

So I defined a msg GenCSV with two elelemts,

ServiceName occurance 1, 1

Parms - a complex element containing element parm.

I set parm's occurance to 0, -1. However, based on documentation, "repeating element delimiter" cannot be the same as "Delimiter".

Of course, I can avoid setting the "Delimiter" at messageset level and remove the first element "ServiceName", and use the first element of Parms as ServiceName, and set parm's occurance to 1,-1 and use ',' as repeating element delimiter. But this is not as straightforward for developers.

So here the question: is there a way to get around of the above limitation?


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
kimbert
PostPosted: Sun Jul 19, 2009 2:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Put the repeating element inside its own group?
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Jul 20, 2009 4:10 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hi kimbert, thanks for stepping in. Now I know an answer is available.

kimbert wrote:
Put the repeating element inside its own group?


Are you saying I can use the same delimiter ',' for data element separation and repeating element separation? Or do you mean, I put them all under a single parent element?

- I got it. You mean using a single parent element, containing a first element SvcName with (1,1) occurence, and second element with (0,-1) occurence. This way there should be no confusion for the parser.

But then, why not doing the same at the root level? Will try it out now.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 21, 2009 1:29 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I was suggesting a model like this
Code:

Element name="message"
  complexType DataElementSeparation="All Elements Delimited" Delimiter="<cr>"
    element name="line"
      complexType DataElementSeparation="All Elements Delimited" Delimiter=","
        element name="ServiceName" ...
        group DataElementSeparation="All ElementsDelimited" Delimiter="anythingYouLike"
          element name="parameter" maxOccurs="-1" RepeatingElementDelimiter=","
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 » How to creating generic CSV with repeating elements
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.