Skip to content

SchemasRoot en

Alexey Zakharov edited this page Apr 6, 2024 · 1 revision

Attention! This article, as well as this announcement, are automatically translated from Russian.

XML schema directory

All actions require specifying the directory containing XML schemas in the call options. It may be hosted locally or not. To access, you need to implement the IStreamFactory interface from the Net.Leksi.Streams.Abstraction package and connect it with a key corresponding to the Uri scheme in the application services configuration. For local files, such an implementation LocalFileStreamFactory is included in this library.

Example

HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
...
// for local file
builder.Services.AddKeyedSingleton<IStreamFactory, LocalFileStreamFactory>("file");
// for Amazon s3 (not included, implement it yourself)
builder.Services.AddKeyedSingleton<IStreamFactory, S3StreamFactory>("s3");
...
IHost host = builder.Build();
await host.RunAsync();


When translating from EDIFACT to XML, each message is written as an XML document in a separate stream. The structure of this document follows the XML schema corresponding to this message. Customized schemes are contained in files that differ from standard ones by the presence of a suffix specified during customization (EdifactMessageCustomizer). To use a customized scheme when calling translators, the options specify the correspondence of the suffix to the message type. More details about this in the descriptions of option classes: EdifactBuilderOptions, EdifactParserOptions, EdifactMessageVisualizerOptions.

Editing diagrams manually is not allowed.

Review | To the top of the page

Clone this wiki locally