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
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
M KlineSubject: XML to EDI
Author: M Kline
Date: 19 Mar 2007 08:50 PM
Hello,

I'm trying to map XML to XML, then convert to EDI format. I'm stuck on my XSL.

Source XML is: JLGForecastDemandDownload.xml

XSL is: JLG.xsl

Output is: JLGOutput.xml

Desired output needs to have the Part, Description, UOM, Start Date, Qty then next Part, Description, UOM, Start Date, Qty and so on.

I need to then convert the Desired output to an EDI file, similar to: EDI.edi

I'm stuck. Can anyone assist?

Thanks!


UnknownJLG.zip
Attachments zip file

Postnext
Elias HuterSubject: XML to EDI
Author: Elias Huter
Date: 30 Mar 2007 07:37 AM
Usually you use third party tools to convert EDIFACT XML to EDIFACT // EDIFACT to EDIFACT XML. I don't know whether Stylus has that feature or not, but you can google for other companies who offer tools for that.

If you only have one EDIFACT Format (e.g. ORDERS) and know exactly which segments will be delievered you can even try an XSLT Mapping which delievers the final EDI File:

<xsl:output method="text"> instead of <xsl:output method="xml">
and you don't map to tags (e.g. <LIN>...</LIN) but the final result (LIN*4*BP* ...)

But be aware that this can very fast be an unsolvable problem if you expect just a little bit complexer EDIFACTs. This will only work for very simple scenarios.

Postnext
Tony LavinioSubject: XML to EDI
Author: Tony Lavinio
Date: 30 Mar 2007 10:20 AM
Elias, Stylus Studio has very sophisticated EDI handling
built into it.

M Kline, we'll take a look and see if we can help out.

Postnext
Tony LavinioSubject: XML to EDI
Author: Tony Lavinio
Date: 30 Mar 2007 01:32 PM
Instead of mapping to an intermediate format and then to
the EDI, I think you'd be better served mapping directly
to the EDI schema.

For your output document, create the schema. You're using
X12, so to create the target schema do
File|Document Wizards|X12 to XML Schema and then choose
transaction set 830 in release 004010.

When you actually map, where your existing target example
uses multiple LIN03's and LIN05's, you're going to have to
create multiple LIN segments, one for each item. I'm not
quite sure what to do with the FST01's, but I imagine it
would be something similar.

For the final step, instead of writing to a file xyz.xml,
write to a file adapter:EDI:xyz.x12 and it should work.
You're closer than you think...

Posttop
M KlineSubject: XML to EDI
Author: M Kline
Date: 30 Mar 2007 01:36 PM
Thanks Tony

I will give that a try.

 
Topic Page 1 2 3 4 5 6 7 8 9 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.