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 » Tags not exporting from xml to TDS

Post new topic  Reply to topic
 Tags not exporting from xml to TDS « View previous topic :: View next topic » 
Author Message
martc
PostPosted: Fri Dec 08, 2006 1:33 pm    Post subject: Tags not exporting from xml to TDS Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Hi, I'm hoping someone can shed some light.... Im trying to recreate the 'Fix Message Set ' in WBI 6 sample using my own schema and input.

I've created a simple 'Contact' message set with two physical formats (XML1,TDS1). There is one message definition file which I created by importing xsd (attached). My goal is a simple xformation from xml to TDS with the tags: i.e. First=John:Middle=X:Last=Doe:DateOfBirth=1/1/2006:Address=MyStreet

with input of

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSPY v2004 rel. 4 U (http://www.xmlspy.com)-->
<Contact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\GenericWorkingFolder\mqsi\temp\SimpleSchema.xsd">
<Name>
<First>John</First>
<Middle>X</Middle>
<Last>Doe</Last>
</Name>
<Address>My Street</Address>
<DateOfBirth>1967-08-13</DateOfBirth>
</Contact>


My output is 'JohnXDoeMy Street1967-08-13' without tags

Under the properties of each element I have the tag names present. Under the TDS1 properties I have the delimiter and Tag data separator as ': & =' and Im still not getting the Tags to export. Im missing something....


Thanks in advance

Contact xsd:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by me -->
<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Contact">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Name">
<xs:complexType>
<xs:sequence>
<xs:element name="First" type="xs:string"/>
<xs:element name="Middle" type="xs:string"/>
<xs:element name="Last" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Address" type="xs:string"/>
<xs:element name="DateOfBirth" type="xs:date"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 08, 2006 1:39 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Try going the other way.

See if you can get your TDS definition to succesfully parse a correct output document.

If you get errors with that, then debug those until it succeeds.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
martc
PostPosted: Fri Dec 08, 2006 2:28 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

I did, and its not working either.

I only imported one xsd representing how the xml file should look. Should I be doing anything else representing the TDS? I am missing something basic it seems.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 08, 2006 5:53 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Lemme try again.

Go the other way.

Find the bugs that happen.

Fix them.

Keep looking for bugs and fixing them until there aren't any bugs.

Then go back the way you started to go. You're fairly certain the XML works - you don't know if the TDS does at all. Fix the TDS first.

Yes, you have to do more than describe the XML data if you want to also model the TDS data.

You have to describe the TDS data.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Dec 09, 2006 2:28 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi martc,

Quote:
My goal is a simple xformation from xml to TDS with the tags
Sorry to bring bad news, but there is no such thing as a 'simple transformation from XML to TDS'. XML is the only universal standard for rendering data as text. TDS has been designed to cope with everything else - the entire universe of non-XML text formats. Believe me, that is a big universe. Your chosen output format is one of literally hundreds of equally good alternatives. You need to describe your format in tedious detail by setting the TDS properties of each complex type and each element in your message model.
I'm not going to attempt to teach you TDS modelling. You need to read the docs and look at the samples. A couple of pointers though:
- Set Data Element Separation to 'Tagged Delimited' on each complex type ( default is 'Fixed Length' ),
- Set the Delimiter to ; on each complex type
- Set a TDS Tag for each element ( it is empty by default ).

And please note : if this sounds difficult, it is not because message broker is making it so. Modelling arbitrary text formats is always difficult, whatever tool you choose to utilise.
Back to top
View user's profile Send private message
martc
PostPosted: Mon Dec 11, 2006 12:27 pm    Post subject: Reply with quote

Apprentice

Joined: 23 Mar 2005
Posts: 39

Thanks Kimbert and Jeff

That helped and it worked!

I was missing the setting of the complex types in data element separation to 'Tagged Filimited'. Once I set those correctly my TDS came out exactly as expected. Well almost ... the namespaces also were extracted but that is fine. I can work with that.

Thanks again.
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 » Tags not exporting from xml to TDS
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.