Websydian v6.1 online documentationOnline documentation - Websydian v6.5

TransacXML introduction example model

Introduction

This document contains a description of the content of the Plex local model that contains the implemented examples for the TransacXML introduction documents.

In addition to describing the content of the model, it also specifies how you can build and test the examples.

The model has been created using Plex 5.5. If you open this using a later version of Plex, you will get a warning - just accept this and proceed to open the model.

Modeling XML documents

The example document described in the modeling document can be found scoped by the placeholder entity BasicExample.

The modeling can't be tested separately. By testing the create and read examples described below, you will also test the model.

Creating XML documents

The export function for the document creation is the unscoped function "CreateHorseXml".

You can test this function by executing the "_TestHorseXml" function, specify a location where the generated file should be saved - and press the "Create" button on the panel.

Reading XML documents

Example 1 - TraverseAndFetch

The import function for the example showing how to read using TraverseAndFetch is the unscoped function "ReadHorseXml_TraverseAndFetch".

You can test this function by executing the "_TestHorseXml" function, specify a location where the file containing the XXML document is located (full path) - and press the "TraverseAndFetch" button on the panel.

Example 2 - GetFirstOccurrence, ProcessGroup, SingleFetch

The import function for the example showing how to read using the three functions is the unscoped function "ReadHorseXml_Functions".

You can test this function by executing the "_TestHorseXml" function, specify a location where the generated file should be saved - and press the "Read" button on the panel.

Example 3 - Read Course data only

The import function for the example showing how to read the Course data only is the unscoped function "ReadHorseXml_Course".

You can test this function by executing the "_TestHorseXml" function, specify a location where the generated file should be saved - and press the "Course Only" button on the panel.

Example 4 - Read data for a specific Horse

The import function for the example showing how to read data for a specific Horse is the unscoped function "ReadHorseXml_ByHorseName".

You can test this function by executing the "_TestHorseXml" function, specify a location where the generated file should be saved - and press the "Specific Horse" button on the panel.

Running the examples

Before you can run the examples, you must generate and build the necessary subject areas and the example objects themselves.

Local model configuration

You must start by setting up the configuration of the local model.

As the example model only has a few Websydian libraries attached, the setup itself is reasonably simple. You just need to set the variant for SDSTRING and WSYDOM and to ensure that all the version and levels of the model is set to v6.1.

For a WinC application:

For a Java application (note that to run the example, you also have to specify the variant for the UIBASIC library):

 

Generate and build options

After this, you have to specify the Generate and Build options. This is described in the general documents describing how to setup your local model.

In the documents, find the section "Configure Generate and Build options".

Generate and build subject areas

You must generate and build the subject areas:

Generate and build application

Generate and build:

 

WinC only

Create an exe function for _TestHorseXml.

Copy the appropriate WsydXml11.dll and WsydDwa21.dll files to your Gen folder. The files are found in Plex version specific folders under the Websydian installation folder:

...Websydian\Websydian v6.1\Deployment\Windows