XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
steven nourseSubject: Another edi question.
Author: steven nourse
Date: 05 Aug 2008 12:56 PM
I have successfully made a map from a custom xml file to edi. However, I had to modify the default schema for the edi because it was missing some values and I renamed the groups to be more logical. Now I am trying to convert a edi file back to my xml file.

I open the document using the edi converter for the source document and when I map the fields to my xml file it will put in multiple wrong values.

Is there a way I can use my custom edi schema to make a map to my xml then use that to process an edi file created from that schema??

Basically need xml->custom edi->xml

Postnext
Minollo I.Subject: Another edi question.
Author: Minollo I.
Date: 05 Aug 2008 01:10 PM
>...
>I had to modify the default schema for the edi because it was missing
>some values and I renamed the groups to be more logical.

Are you using XML Converters to convert XML to EDI? XML Converters require a well defined input XML structure to generate a corresponding EDI file; can you provide more details about what you did here, maybe sending us an example at stylus-field-report@progress.com ?

>I open the document using the edi converter for the source document
>and when I map the fields to my xml file it will put in multiple
>wrong values.

That seems to suggest the mapping you have defined is wrong; sending us an example would be the easiest way to understand what's wrong. Of course, this might also mean that the changes you have mentioned above are forcing XML Converters to generate a wrong EDI file in the first place.

>Is there a way I can use my custom edi schema to make a map to my xml
>then use that to process an edi file created from that schema??
>Basically need xml->custom edi->xml

I think taking this offline and emailing us details (and artifacts) of what you are trying to do is the fastest way to answer your questions.

Postnext
steven nourseSubject: Another edi question.
Author: steven nourse
Date: 05 Aug 2008 02:11 PM
I have emailed the files but I have determined my main problem. When I open my generated edi file using the converter it puts groups multiple times and this causes the multiple values to appear in one field.

Example:
<GROUP_1>
<NM1>
<NM101><!--98: Entity Identifier Code-->41<!--Submitter--></NM101>
<NM102><!--1065: Entity Type Qualifier-->2<!--Non-Person Entity--></NM102>
<NM103><!--1035: Name Last or Organization Name-->IMGIN</NM103>
<NM108><!--66: Identification Code Qualifier-->46<!--Electronic Transmitter Identification Number (ETIN)--></NM108>
<NM109><!--67: Identification Code-->351785962</NM109>
</NM1>
<PER>
<PER01><!--366: Contact Function Code-->IC<!--Information Contact--></PER01>
<PER02><!--93: Name-->IMGIN</PER02>
<PER03><!--365: Communication Number Qualifier-->TE<!--Telephone--></PER03>
<PER04><!--364: Communication Number-->3176559777</PER04>
</PER>
</GROUP_1>
<GROUP_1>
<NM1>
<NM101><!--98: Entity Identifier Code-->40<!--Receiver--></NM101>
<NM102><!--1065: Entity Type Qualifier-->2<!--Non-Person Entity--></NM102>
<NM103><!--1035: Name Last or Organization Name-->FIRST HEALTH</NM103>
<NM108><!--66: Identification Code Qualifier-->46<!--Electronic Transmitter Identification Number (ETIN)--></NM108>
<NM109><!--67: Identification Code-->201736437</NM109>
</NM1>
</GROUP_1>

Postnext
Minollo I.Subject: Another edi question.
Author: Minollo I.
Date: 05 Aug 2008 02:21 PM
Originally Posted: 05 Aug 2008 02:20 PM
We have received your files, and we will provide feedback as soon as possible.

About the fragment you posted: there is nothing wrong about having multiple GROUP_1 occurences; you can use NM101 in the case you describe to identify what that specific GROUP_1 is used for: Submitter in the first case, Receiver in the second one.

Postnext
steven nourseSubject: Another edi question.
Author: steven nourse
Date: 05 Aug 2008 02:25 PM
With those multiple group 1 segments in there when I map the Group 1 nm 1 field to a field in my xml file it will concat both the nm1's together so if I take nm103 and place it to BillingProvider field it ends ups being
<BillingProvider>
IMGINFirst Health
</BillingProvider>

Instead I just need
<BillingProvider>
IMGIN
</BillingProvider>

Any suggestions?

Posttop
Minollo I.Subject: Another edi question.
Author: Minollo I.
Date: 05 Aug 2008 02:35 PM
You would do this:

<pages>
{
for $TS_837 in doc('converter:EDI?file:///c:/steven.nourse/output.edi')/X12/TS_837
return
<page>
<BillingProvider>
{
$TS_837/GROUP_1[./NM1/NM101 = "41"]/NM1/NM103/text()
}
</BillingProvider>
</page>
} </pages>

...to see/create that "XPath predicate" in the Mapper tab, make sure you check the option in Tools > Options > XQuery > Mapper

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.