Save XML document in X12 format
Do File|Save As and pick a different destination filename making sure that "Convert from XML using converter" is checked and the EDI converter is selected
And using the values specified for segment terminators, element separators, etc, as specified on the web page.
I get the following error:
com.ddtek.xmlconverter.exception.ConverterException: Error during conversion: .\:decimal=.:tertiary=&:repeat=~?file:\c:\Documents and Settings\jjamsa\My Documents\StylusStudioProjects\278.txt (The filename, directory name, or volume label syntax is incorrect)
at com.ddtek.xmlconverter.exception.ConverterException.WrapAsConverterException(ConverterException.java:51)
at com.ddtek.xmlconverter.impl.Job.<init>(Job.java:82)
at com.ddtek.xmlconverter.impl.ConverterImpl.convert(ConverterImpl.java:143)
at com.stylusstudio.adapter.fs.AdapterFile.getOutputStream(AdapterFile.java:110)
at com.exln.stylus.io.StylusFileHelpers.copyFromStream(StylusFileHelpers.java:139)
at com.exln.stylus.io.StylusFileHelpers.copyFromFile(StylusFileHelpers.java:110)
at com.stylusstudio.adapter.fs.AdapterFile.copyFromFile(AdapterFile.java:116)
Caused by: java.io.FileNotFoundException: .\:decimal=.:tertiary=&:repeat=~?file:\c:\Documents and Settings\jjamsa\My Documents\StylusStudioProjects\278.txt (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.ddtek.xmlconverter.ConverterResolver.outputStreamResolver(ConverterResolver.java:185)
at com.ddtek.xmlconverter.ConverterResolver.createOutputStream(ConverterResolver.java:244)
at com.ddtek.xmlconverter.platform.Smart$SmartUrlResult.CreateOutputStream(Smart.java:649)
at com.ddtek.xmlconverter.impl.Job.<init>(Job.java:73)
... 5 more
Subject:Generating X12 from XML Author:Tony Lavinio Date:01 Jul 2008 06:05 PM
You can't pass in an unescaped '?' as the release character through
the URI mechanism, since it's already used as part of the URI to
separate the converter specification from the underlying filename.
As an aside, X12 doesn't use an escape or release character, so it
wouldn't make any difference.
That particular example was showing what the default PI's were, for
EDI converters in general, and since the PI's don't go through the
URI syntax, they don't need escaping for special characters except
the ones that XML requires.
Normally, those options aren't set on EDI-to-XML, since they can be
inferred from the EDI file. The exception might be for EDIFACT files
when the UNA segment is omitted but the standard values aren't used.
On XML-to-EDI, they are more commonly used to set what the special
characters should be on the output EDI file.
Subject:Generating X12 from XML Author:Jon Jamsa Date:02 Jul 2008 09:58 AM
> On XML-to-EDI, they are more commonly used to set what the special
> characters should be on the output EDI file.
Are you saying that I shouldn't have to specify those characters when saving XML to EDI? That would be nice, but frankly I haven't found any combination of approaches that will allow me to successfully convert an XML file to EDI. The XML was generated from the XSD that Stylus Studio provided for version 5010 of the 278.
If I don't get the error previously listed, I get out of memory exceptions.
Subject:Generating X12 from XML Author:Tony Lavinio Date:02 Jul 2008 12:55 PM
Is there any chance you could send us a copy of the
troublesome 278 XML file? We will keep it confidential
if you send it to stylus-field-report@progress.com.