Oracle® Application Server Adapters for Files, FTP, Databases, and Enterprise Messaging User's Guide 10g Release 3 (10.1.3.1.0) Part Number B28994-02 |
|
|
View PDF |
This chapter describes the Native Format Builder Wizard, which enables you to create native schemas used for translation. Use cases and constructs for the schema are also provided.
This chapter contains the following topics:
Oracle BPEL Process Manager and Oracle Enterprise Service Bus requires native schemas for translation, which are based on XML schema. However, not all commonly used formats use XML schema files. To address this situation, Oracle BPEL Process Manager and Oracle Enterprise Service Bus provides the Native Format Builder Wizard. When you click the Define Schema for Native Format button of the Messages dialog box of the Adapter Configuration Wizard shown in Figure 7-1, the Native Format Builder Wizard is displayed. The Messages window is the last window to be displayed in the Adapter Configuration Wizard prior to the Finish window.
Figure 7-1 Starting the Native Format Builder Wizard
The Native Format Builder Wizard guides you through the creation of a native schema file from the following formats shown in Figure 7-2. A sample data file format for the selected type must already exist; you cannot create a native schema without one. You can also select to modify an existing native schema previously created with this wizard, except for those generated from a Document Type Definition (DTD) or COBOL copybook.
This option enables you to create native schemas for records, where the fields are separated by a value such as a comma or number sign(#).
This option enables you to create native schemas for records, where all fields are all of fixed lengths.
This option enables you to generate native schema from the user-supplied COBOL copybook definition.
A COBOL mainframe application typically uses a COBOL copybook file to define its data layout. The converter creates a native schema from a copybook so that the run-time translator can parse the associated data file.
A COBOL copybook is typically a collection of group items (structures). These group items contain other items, which can be groups or elementary items. Elementary items are items that cannot be further subdivided. For example:
01 Purchase-Order 05 Buyer 10 BuyerName PIC X(5) USAGE DISPLAY. 04 Seller 08 SellerName PICTURE XXXXX.
Purchase-order
is a group item with two child group items (Buyer
, Seller
). The numbers 01
, 05
, 04
, and so on indicate the level of the group (that is, the hierarchy of data within that group).Groups can be defined that have different level-numbers for the same level in the hierarchy. For example, Buyer
and Seller
have different level numbers, but are at the same level in the hierarchy. A group item includes all group and elementary items that follow it until a level number less than or equal to the level number of that group is encountered.
Each of the group items (Buyer
and Seller
) has a child elementary item. The PIC
or PICTURE
clause defines the data layout. For example, BuyerName
defines an alphanumeric type of size equal to five characters. SellerName
has exactly the same data layout as BuyerName
.
Group items in COBOL can be mapped to elements in XML schema with the complexType
type. Similarly, elementary items can be mapped to elements of type simple type with certain native format annotations to help the run time translator parse the corresponding data file. For example, the Buyer
item can be mapped to the following definition:
<!--COBOL declaration : 05 Buyer--> <element name="Buyer"> <complexType> <sequence> <!--COBOL declaration : 10 Name PIC X(5)--> <element name="Name" type="string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="5"/> </sequence> </complexType> </element>
User Inputs
You are expected to provide the following information:
Target namespace for the native schema to be generated
Character set of the host computer on which the data file was generated. By default this is set to EBCDIC (ebcdic-cp-us
).
Byte order of the host computer on which the data file was generated. By default this is set to big-endian.
Record delimiter, which is typically the newline character, or no delimiter, or any user-supplied string
Container tag name for generated native schema. By default, this is set to Root-Element
.
Table 7-1 describes COBOL clauses. The numeric types covered in Table 7-1 are stored as one character per digit. Support for clauses is defined as follows:
Y
indicates that the clause is supported.
N
indicates that the clause is not supported.
I
indicates that the clause is ignored.
Table 7-1 COBOL Clauses (Numeric Types Stored as One Character Per Digit)
COBOL Clause | Design-Time Support | Run-Time Support | Supported Synonyms | Comments |
---|---|---|---|---|
|
|
|
|
Alphanumeric – An allowable character from the character set of the computer. Each X corresponds to one byte. |
|
|
|
|
Alphabetic – Any letter of the alphabet or space. Each A corresponds to one byte. |
|
|
|
|
Any character position that contains a numeral. Each nine is counted in the size of the item. |
|
|
|
Fixed-length array |
|
|
|
|
For |
|
|
|
|
Allows the same computer memory area to be described by different data items. |
|
|
|
|
Size = |
|
|
|
|
NA |
|
|
|
|
Ignored |
|
|
N |
N |
This is rarely seen in COBOL copybooks |
|
|
N |
N |
Four-byte index |
|
|
|
I |
|
NA |
|
|
|
NA |
|
|
NA |
|||
|
|
|
NA |
The numeric types described in Table 7-1 are stored as one character per digit. Table 7-2 describes the numeric types that are stored in a more efficient manner.
Table 7-2 COBOL Clauses (Numeric Types Stored More Efficiently)
COBOL Clause | Design-Time Support | Run-Time Support | Supported Synonyms | Comments |
---|---|---|---|---|
|
Y |
Y |
Both these keywords are optional. |
|
|
Y |
Y |
|
Length varies with
|
|
Y |
Y |
|
Single precision, floating point number that is four bytes long. |
|
|
|
|
Double precision, floating point number that is eight bytes long. |
|
|
|
|
Two digits are stored in each byte. An additional half byte at the end is allocated for the sign, even if the value is unsigned. |
|
|
|
|
Treated the same as a |
|
|
|
Capacity of the native binary representation. |
|
|
|
|
|
Sign nibble in the right-most zone by default. |
|
|
|
Same as |
|
|
|
|
NA |
|
|
|
|
Length is the same as |
|
|
|
|
Length = |
The following clauses can be added to impact the sign position.
SIGN IS LEADING
Used with signed zoned numerics.
SIGN IS TRAILING
Used with signed zoned numerics.
SIGN IS LEADING SEPARATE
The character S
is counted in the size.
SIGN IS TRAILING SEPARATE
The character S
is counted in the size.
Note:
These assume that the numerics are stored using IBM COBOL format. If these are generated for other platforms with different data storage formats, then a custom data handler for that type must be written.Table 7-3 describes picture editing types.
Table 7-3 Edited Pictures
Edited Pictures | Supported Editing Types | Unsupported Editing Types |
---|---|---|
Edited alphanumeric |
Simple Insertion: B(blank) |
|
Edited float numeric |
Special insertion: |
|
Edited numeric |
|
|
Edited pictures are more for presentation purposes and are rarely seen in data files. It is assumed that the editing symbols are also present in the data. For example, if you have:
05 AMOUNT PIC 999.99
Then, this field is six bytes wide and has a decimal point in the data.
Simple, special, and fixed insertions are handled by this method. Floating insertion, zero suppression, and replacement insertion are not supported.
For delimited and fixed-length files, you are guided through dialog boxes that prompt you for the following information to create definitions in native schema format:
The data file to sample (from which to create a native schema) and its encoding
The number of rows to skip and the number of rows to sample in the file
If the file contains multiple records, are they the same type or different types
The target namespace, container element name, and record name
The record delimiter (for example, end-of-line) and field delimiter (for example, comma or hash sign (#)) or field length
The field properties (such as name, data_type, delimiter, and length)
DTD and COBOL copybook files already include definitions in their native formats. For these formats, the Native Format Builder Wizard prompts you for the following information to create native schema versions of these definitions.
The filename of the DTD or COBOL copybook definition, namespace, and root element
The character set, byte order, and records delimiter (for COBOL copybook only)
As you move through the wizard dialog boxes, the native schema file being created is displayed at the bottom. This enables you to watch the native schema file being built. The final window displays the generated native schema for the native format shown in Figure 7-3. You can edit this format before clicking Next.
Figure 7-3 Native Schema Generated From Native Format
When you click Finish, you are returned to the Messages dialog box of the Adapter Configuration Wizard shown in Figure 7-1. The Schema File URL and Schema Element fields are filled in with details about your newly created native schema file. You can now use the Adapter Configuration Wizard to create a WSDL file for the adapter to communicate with your BPEL process or ESB service.
This section provides use cases and explains various constructs of native schema to translate the native format data to XML.
This section contains the following topics:
Note:
Not all native schemas can be generated from the Native Format Builder Wizard. This wizard can handle only basic scenarios. This section describes the capabilities of the native schema using various examples and use cases.This section contains the following topics:
A comma-separated value (CSV) file is a common non-XML file structure. A CSV file may or may not have the first few lines as headers, in which case, you may want to ignore them.
Native Data Format to Be Translated
The following native data format is provided:
Name,Street,City,State,Country ABC Private Limited, Street 1, Bangalore, Karnataka, India XYZ Private Limited, Street 2, Bangalore, Karnataka, India
Native Schema
The corresponding native schema definition can be defined as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" xmlns:tns="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:encoding="US-ASCII" nxsd:headerLines="1" nxsd:stream="chars" nxsd:version="NXSD"> <xsd:element name="AddressBook"> <xsd:complexType> <xsd:sequence> <xsd:element name="Address" minOccurs="1" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="Name" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," > </xsd:element> <xsd:element name="Street" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," > </xsd:element> <xsd:element name="City" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," > </xsd:element> <xsd:element name="State" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," > </xsd:element> <xsd:element name="Country" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" > </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
The nxsd:headerLines="1"
in this schema, at the xsd:schema
construct, means that one line will be skipped in the native data before actually translating the rest of the data. This is because the first line is a header line. If nxsd:stream
is specified as chars
such as nxsd:stream="chars"
, then it means that the data should be read as characters. If nxsd:stream
is set as bytes
, nxsd:stream="bytes"
, then it means that the native data should be read as bytes. For each of the element declarations, Name
, Street
, City
, State
, Country
, which have a corresponding scalar data, the nxsd:style="terminated"
defines that the corresponding data is stored in terminated style. The actual terminator is then defined by the nxsd:terminatedBy=","
attribute specified at that construct. See Section 7.2.2.2, "Defining Terminated Data" for details on the terminated style.
Translated XML Using the Native Schema
The native data using the corresponding native schema format is translated to the following XML:
<AddressBook xmlns="http://www.oracle.com/ias/processconnect"> <Address> <Name>ABC Private Limited</Name> <Street>Street 1</Street> <City>Bangalore</City> <State>Karnataka</State> <Country>India</Country> </Address> <Address> <Name>XYZ Private Limited</Name> <Street>Street 2</Street> <City>Bangalore</City> <State>Karnataka</State> <Country>India</Country> </Address> </AddressBook>
The use case defined in the previous example is just one specific case of the *SV class, where the wildcard can be substituted by any character or string. For example, for the native data containing a plus (+)
separated value.
Native Data Format to Be Translated
The following native data format is provided:
a+b+c+d+e f+g+h+i+j
Native Schema
The corresponding native schema definition is similar to the one in the previous use case except that instead of nxsd:terminatedBy=","
you now define the terminated by format as nxsd:terminatedBy="+"
. See Section 7.2.2.2, "Defining Terminated Data" for details about the terminated style.
In this example, the native data used is the same as in the CSV case. The only difference is that here the data is fixed length, and not CSV.
Native Data Format to Be Translated
The following native data format is provided:
Name Street City State Country ABC Private Limited Street1 Bangalore Karnataka India XYZ Private Limited Street1 Bangalore Karnataka India
Native Schema
The corresponding native schema definition is similar to the definition of the CSV, but the style
now changes from nxsd:style="terminated"
to nxsd:style="fixedLength"
along with the relevant attributes for the fixed-length style. For the fixed-length style, the one mandatory attribute is the length: nxsd:length
. The value of nxsd:length
is the actual length of the data to be read. The complete definition for fixed-length style for the native data to be translated can be defined as follows:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" xmlns:tns="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:encoding="US-ASCII" nxsd:headerLines="1" nxsd:stream="chars" nxsd:version="NXSD"> <xsd:element name="AddressBook"> <xsd:complexType> <xsd:sequence> <xsd:element name="Address" minOccurs="1" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="Name" type="xsd:string" nxsd:style="fixedLength" nxsd:length="31"> </xsd:element> <xsd:element name="Street" type="xsd:string" nxsd:style="fixedLength" nxsd:length="19"> </xsd:element> <xsd:element name="City" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10"> </xsd:element> <xsd:element name="State" type="xsd:string" nxsd:style="fixedLength" nxsd:length="10"> </xsd:element> <xsd:element name="Country" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}"> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
See Section 7.2.2.1, "Defining Fixed-Length Data" for details about the fixed-length style.
An invoice is a more complex structure than the structure in the previous CSV, *SV, and fixed-length use cases. An invoice usually contains buyer information, seller information, and line items.
Native Data Format to Be Translated
The following native data format for an invoice is provided:
6335722^Company One^First Street 999 San Jose 95129USCA650-801-6250 ^Oracle^Bridge Parkway 1600 Redwood Shores 94065USCA650-506-7000 001|BPEL Process Manager Enterprise Edition|20000,2,+40000+ 002|BPEL Process Manager Standard Edition|10000,5,+50000+ 003|BPEL Process Manager Developer Edition|1000,20,+20000+#110000
The first line in the native data is purchaser details, followed by seller details, followed by line items, and finally the total for the line items. Both purchaser and seller have the following same structure:
The first seven characters are the UID
This is followed by the buyer/seller name surrounded by Ò^
Ó.
This is followed by the address until the end of the line.
This address contains a fixed-length street, city, and so on. The last line item ends with the number symbol Ò#
Ó, followed by the line-item total.
Native Schema
The native schema definition corresponding to the preceding native data can be defined as follows:
<schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/ias/pcbpel/fatransschema/demo" xmlns:tns="http://xmlns.oracle.com/ias/pcbpel/fatransschema/demo" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="NXSD" nxsd:stream="chars"> <element name="invoice" type="tns:invoiceType" /> <complexType name="invoiceType"> <sequence> <element name="purchaser" type="tns:partnerType" /> <element name="seller" type="tns:partnerType" /> <element name="line-item" type="tns:line-itemType" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}" nxsd:arrayTerminatedBy="#"/> <element name="total" type="double" nxsd:style="terminated" nxsd:terminatedBy="${eol}"/> </sequence> </complexType> <complexType name="partnerType"> <sequence> <element name="uid" type="string" nxsd:style="fixedLength" nxsd:length="7" nxsd:padStyle="tail" nxsd:paddedBy=" "/> <element name="name" type="string" nxsd:style="surrounded" nxsd:surroundedBy="^"/> <element name="address" type="tns:addressType" /> </sequence> </complexType> <complexType name="addressType"> <sequence> <element name="street1" type="string" nxsd:style="fixedLength" nxsd:length="15" nxsd:padStyle="tail" nxsd:paddedBy=" "/> <element name="street2" type="string" nxsd:style="fixedLength" nxsd:length="10" nxsd:padStyle="tail" nxsd:paddedBy=" "/> <element name="city" type="string" nxsd:style="fixedLength" nxsd:length="15" nxsd:padStyle="tail" nxsd:paddedBy=" "/> <element name="postal-code" type="string" nxsd:style="fixedLength" nxsd:length="5" nxsd:padStyle="none"/> <element name="country" type="string" nxsd:style="fixedLength" nxsd:length="2" nxsd:padStyle="none"/> <element name="state" type="string" nxsd:style="fixedLength" nxsd:length="2" nxsd:padStyle="none"/> <element name="phone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}"/> </sequence> </complexType> <complexType name="line-itemType"> <sequence> <element name="uid" type="string" nxsd:style="fixedLength" nxsd:length="3" nxsd:padStyle="none"/> <element name="description" type="string" nxsd:style="surrounded" nxsd:surroundedBy="|"/> <element name="price" type="double" nxsd:style="terminated" nxsd:terminatedBy=","/> <element name="quantity" type="integer" nxsd:style="terminated" nxsd:terminatedBy=","/> <element name="line-total" type="double" nxsd:style="surrounded" nxsd:surroundedBy="+"/> </sequence> </complexType> </schema>
Translated XML Using the Native Schema
The translated XML looks as follows:
<invoice xmlns="http://xmlns.oracle.com/pcbpel/demoSchema/invoice-nxsd"> <purchaser> <uid>6335722</uid> <name>Company One</name> <address> <street1>First Street</street1> <street2>999</street2> <city>San Jose</city> <postal-code>95129</postal-code> <country>US</country> <state>CA</state> <phone>650-801-6250</phone> </address> </purchaser> <seller> <uid/> <name>Oracle</name> <address> <street1>Bridge Parkway</street1> <street2>1600</street2> <city>Redwood Shores</city> <postal-code>94065</postal-code> <country>US</country> <state>CA</state> <phone>650-506-7000</phone> </address> </seller> <line-item> <uid>001</uid> <description>BPEL Process Manager Enterprise Edition</description> <price>20000</price> <quantity>2</quantity> <line-total>40000</line-total> </line-item> <line-item> <uid>002</uid> <description>BPEL Process Manager Standard Edition</description> <price>10000</price> <quantity>5</quantity> <line-total>50000</line-total> </line-item> <line-item> <uid>003</uid> <description>BPEL Process Manager Developer Edition</description> <price>1000</price> <quantity>20</quantity> <line-total>20000</line-total> </line-item> <total>110000</total> </invoice>
When the native data is XML and that XML has no namespace, the Native Format Translator can be used to add a namespace to an inbound XML document and remove the namespace from an outbound XML document.
The XML has no namespace when either of the following is true:
The XML has a corresponding XML schema and there is no target namespace specified in that XML schema.
The XML has a corresponding DTD which was converted to the XML schema.
In both cases, you need to create a wrapper schema with targetNamespace
specified, and the wrapper schema should include the actual schema. In addition, the wrapper schema should also have the nxsd:version
attribute set to DTD. For example:
--wrapper.xsd <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="myNamespace" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD"> <include schemaLocation="actual.xsd"/> </schema>
Note:
Ensure thatelementFormDefault="qualified"
is specified in the actual schema.Using this wrapper.xsd
in place of actual.xsd
would add myNamespace
namespace to the inbound xml and would remove myNamespace
namespace from the outbound xml.
A demonstration is provided that shows how the file and FTP adapters process a file in COBOL copybook format (through use of the Native Format Builder Wizard) to create a native schema file for translation. For a demonstration that uses the Native Format Builder Wizard to convert a COBOL copybook file to a native schema file, go to
Oracle_Home\integration\orabpel\samples\tutorials\121.FileAdapter\CobolCopyBook
The following COBOL copybook examples are also provided:
A COBOL copybook can have multiple root levels. If all root levels are at 01
level, then each such group implicitly redefines the other.
01 PAYROLL-E-RECORD. 05 PAYROLL-E-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-E-TRANS-CODE PIC X(02). 05 PAYROLL-E-NAME PIC X(08). 05 FILLER PIC X(25). 01 PAYROLL-F-RECORD. 05 PAYROLL-F-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-F-TRANS-CODE PIC X(02). 05 PAYROLL-F-IDENTIFIER-VALUE PIC X(03). 05 PAYROLL-F-NAME PIC X(30). 01 PAYROLL-H-RECORD. 05 PAYROLL-H-EMPLOYEE-NUMBER PIC X(10). 05 PAYROLL-H-TRANS-CODE PIC X(02). 05 PAYROLL-H-HED-NUMBER PIC 9(03). 05 FILLER PIC X(30).
The generated schema is like the following:
<?xml version="1.0" encoding="UTF-8" ?> <!--Native format was generated from COBOL copybook : D:\work\jDevProjects\CCB\Copybooks\payroll.cpy--> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions" targetNamespace="http://TargetNamespace.com/ccb/implicitRedefines" xmlns:tns="http://TargetNamespace.com/ccb/implicitRedefines" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian" nxsd:stream="chars"> <xsd:element name="Payroll-Records"> <xsd:complexType> <!--Please add values for nxsd:lookAhead attributes for the elements in the choice model group.--> <xsd:choice minOccurs="1" maxOccurs="unbounded"> <!--COBOL declaration : 01 PAYROLL-E-RECORD --> <xsd:element name="PAYROLL-E-RECORD" nxsd:lookAhead="" nxsd:lookFor=""> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 05 PAYROLL-E-EMPLOYEE-NUMBER PIC X(10)--> <xsd:element name="PAYROLL-E-EMPLOYEE-NUMBER" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="10"/> <!--COBOL declaration : 05 PAYROLL-E-TRANS-CODE PIC X(02)--> <xsd:element name="PAYROLL-E-TRANS-CODE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="2"/> <!--COBOL declaration : 05 PAYROLL-E-NAME PIC X(08)--> <xsd:element name="PAYROLL-E-NAME" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="8"/> <!--COBOL declaration : 05 FILLER PIC X(25)--> <xsd:element name="FILLER" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="25"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--COBOL declaration : 01 PAYROLL-F-RECORD --> <xsd:element name="PAYROLL-F-RECORD" nxsd:lookAhead="" nxsd:lookFor=""> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 05 PAYROLL-F-EMPLOYEE-NUMBER PIC X(10)--> <xsd:element name="PAYROLL-F-EMPLOYEE-NUMBER" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="10"/> <!--COBOL declaration : 05 PAYROLL-F-TRANS-CODE PIC X(02)--> <xsd:element name="PAYROLL-F-TRANS-CODE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="2"/> <!--COBOL declaration : 05 PAYROLL-F-IDENTIFIER-VALUE PIC X(03)--> <xsd:element name="PAYROLL-F-IDENTIFIER-VALUE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="3"/> <!--COBOL declaration : 05 PAYROLL-F-NAME PIC X(30)--> <xsd:element name="PAYROLL-F-NAME" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="30"/> </xsd:sequence> </xsd:complexType> </xsd:element> <!--COBOL declaration : 01 PAYROLL-H-RECORD --> <xsd:element name="PAYROLL-H-RECORD" nxsd:lookAhead="" nxsd:lookFor=""> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 05 PAYROLL-H-EMPLOYEE-NUMBER PIC X(10)--> <xsd:element name="PAYROLL-H-EMPLOYEE-NUMBER" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="10"/> <!--COBOL declaration : 05 PAYROLL-H-TRANS-CODE PIC X(02)--> <xsd:element name="PAYROLL-H-TRANS-CODE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="2"/> <!--COBOL declaration : 05 PAYROLL-H-HED-NUMBER PIC 9(03)--> <xsd:element name="PAYROLL-H-HED-NUMBER" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="3"/> <!--COBOL declaration : 05 FILLER PIC X(30)--> <xsd:element name="FILLER" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="30"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema>
The top-level payroll records are enclosed in a choice model group. Each payroll record also has two attributes: nxsd:lookAhead
and nxsd:lookFor
that help identify the type of record during runtime processing of the data file. So, you must add values for these attributes. For example, assume PAYROLL-F-RECORD
occurs when the PAYROLL-F-TRANS-CODE
field has a value of FR
. The record element then looks as follows:
<xsd:element name="PAYROLL-F-RECORD" nxsd:lookAhead="10" nxsd:lookFor="FR">
The value 10
indicates the position of the lookahead field.
The following COBOL copybook has multiple root elements at the 05
level:
05 ORG-NUM PIC 99.05 EMP-RECORD. 10 EMP-SSN PIC 9(4)V(6). 10 EMP-WZT PIC 9(6).
The generated schema:
<?xml version="1.0" encoding="UTF-8" ?> <!--Native format was generated from COBOL copybook : D:\work\jDevProjects\CCB\Copybooks\multipleRoot.cpy--> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions" targetNamespace="http://TargetNamespace.com/ccb/multipleRoots" xmlns:tns="http://TargetNamespace.com/ccb/multipleRoots" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:encoding="ASCII" nxsd:byteOrder="littleEndian" nxsd:stream="chars"> <xsd:element name="emp-info"> <xsd:complexType> <xsd:sequence minOccurs="1" maxOccurs="unbounded"> <!--COBOL declaration : 05 ORG-NUM PIC 99--> <xsd:element name="ORG-NUM" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="2"/> <!--COBOL declaration : 05 EMP-RECORD--> <xsd:element name="EMP-RECORD"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 10 EMP-SSN PIC 9(4)V(6)--> <xsd:element name="EMP-SSN" type="xsd:decimal" nxsd:style="virtualDecimal" extn:assumeDecimal="4" extn:picSize="9"/> <!--COBOL declaration : 10 EMP-WZT PIC 9(6)--> <xsd:element name="EMP-WZT" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="6"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
In this (non-01
level) case, an unbounded sequence of the root level items is generated.
Single Root Level, Virtual Decimal, Fixed-Length Array
The following COBOL copybook has a single root level item PO-RECORD
. In a single root level case, the level number does not matter because the converter works in same way. This COBOL copybook also shows an example of a field declared as a virtual decimal (PO-ITEM-PRICE
).
05 PO-RECORD. 10 PO-BUYER. 15 PO-UID PIC 9(7). 15 PO-NAME PIC X(15). 15 PO-ADDRESS. 20 PO-STREET PIC X(15). 20 PO-CITY PIC X(10). 20 PO-ZIP PIC 9(5). 20 PO-STATE PIC X(2). 10 PO-ITEM. 15 POITEM OCCURS 3 TIMES. 20 PO-LINE-ITEM. 25 PO-ITEM-ID PIC 9(3). 25 PO-ITEM-NAME PIC X(40). 25 PO-ITEM-QUANTITY PIC 9(2). 25 PO-ITEM-PRICE PIC 9(5)V9(2). 10 PO-TOTAL PIC 9(7)V9(2).
The generated schema looks as follows:
<?xml version="1.0" encoding="UTF-8" ?> <!--Native format was generated from COBOL copybook : D:\work\ jDevProjects\CCB\Copybooks\po-ccb.cpy--> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions" targetNamespace="http://TargetNamespace.com/ccb/singleRoot" xmlns:tns="http://TargetNamespace.com/ccb/singleRoot" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian" nxsd:stream="chars"> <xsd:element name="Root-Element"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 05 PO-RECORD --> <xsd:element name="PO-RECORD" minOccurs="1" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 10 PO-BUYER--> <xsd:element name="PO-BUYER"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 15 PO-UID PIC 9(7)--> <xsd:element name="PO-UID" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="7"/> <!--COBOL declaration : 15 PO-NAME PIC X(15)--> <xsd:element name="PO-NAME" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="15"/> <!--COBOL declaration : 15 PO-ADDRESS--> <xsd:element name="PO-ADDRESS"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 20 PO-STREET PIC X(15)--> <xsd:element name="PO-STREET" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="15"/> <!--COBOL declaration : 20 PO-CITY PIC X(10)--> <xsd:element name="PO-CITY" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="10"/> <!--COBOL declaration : 20 PO-ZIP PIC 9(5)--> <xsd:element name="PO-ZIP" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="5"/> <!--COBOL declaration : 20 PO-STATE PIC X(2)--> <xsd:element name="PO-STATE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="2"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <!--COBOL declaration : 10 PO-ITEM--> <xsd:element name="PO-ITEM"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 15 POITEM OCCURS 3 TIMES--> <xsd:element name="POITEM" minOccurs="3" maxOccurs="3"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 20 PO-LINE-ITEM--> <xsd:element name="PO-LINE-ITEM"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 25 PO-ITEM-ID PIC 9(3)--> <xsd:element name="PO-ITEM-ID" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="3"/> <!--COBOL declaration : 25 PO-ITEM-NAME PIC X(40)--> <xsd:element name="PO-ITEM-NAME" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="40"/> <!--COBOL declaration : 25 PO-ITEM-QUANTITY PIC 9(2)--> <xsd:element name="PO-ITEM-QUANTITY" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="2"/> <!--COBOL declaration : 25 PO-ITEM-PRICE PIC 9(5)V9(2)--> <xsd:element name="PO-ITEM-PRICE" type="xsd:decimal" nxsd:style="virtualDecimal" extn:assumeDecimal="5" extn:picSize="7"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <!--COBOL declaration : 10 PO-TOTAL PIC 9(7)V9(2)--> <xsd:element name="PO-TOTAL" type="xsd:decimal" nxsd:style="virtualDecimal" extn:assumeDecimal="7" extn:picSize=" "/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
Variable Length Array
05 EMP-RECORD . 10 EMP-NAME PIC X(30). 10 EMP-DIV-NUM PIC 9(5). 10 DIV-ENTRY OCCURS 1 TO 50 TIMES DEPENDING ON EMP-DIV-NUM. 20 DIV-CODE PIC X(30).
The generated schema looks as follows:
<?xml version="1.0" encoding="UTF-8" ?> <!--Native format was generated from COBOL copybook : D:\work\ jDevProjects\CCB\Copybooks\odo.cpy--> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions" targetNamespace="http://TargetNamespace.com/ccb/varLengthArray" xmlns:tns="http://TargetNamespace.com/ccb/varLengthArray" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian" nxsd:stream="chars"> <xsd:element name="Root-Element"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration :05 EMP-RECORD --> <xsd:element name="EMP-RECORD" minOccurs="1" maxOccurs="unbounded"> <xsd:annotation> <xsd:appinfo> <nxsd:variables> <nxsd:variable name="DIV-ENTRY_var0"/> </nxsd:variables> </xsd:appinfo> </xsd:annotation> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 10 EMP-NAME PIC X(30)--> <xsd:element name="EMP-NAME" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="30"/> <!--COBOL declaration : 10 EMP-DIV-NUM PIC 9(5)--> <xsd:element name="EMP-DIV-NUM" type="xsd:long" nxsd:style="fixedLength" nxsd:padStyle="head" nxsd:paddedBy="0" nxsd:length="5"> <xsd:annotation> <xsd:appinfo> <nxsd:variables> <nxsd:assign name="DIV-ENTRY_var0" value="${0}"/> </nxsd:variables> </xsd:appinfo> </xsd:annotation> </xsd:element> <!--COBOL declaration : 10 DIV-ENTRY OCCURS 1 TO 50 TIMES DEPENDING ON EMP-DIV-NUM--> <xsd:element name="DIV-ENTRY" nxsd:style="array" nxsd:arrayLength="${DIV-ENTRY_var0}" minOccurs="1" maxOccurs="50"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 20 DIV-CODE PIC X(30)--> <xsd:element name="DIV-CODE" type="xsd:string" nxsd:style="fixedLength" nxsd:padStyle="tail" nxsd:paddedBy=" " nxsd:length="30"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
Numeric Types
01 NUMERIC-FORMATS. 05 Salary PIC 9(5) COMP-3. 05 Rating PICTURE S9(5). 05 Age PIC 9(3) USAGE COMP. 05 Revenue PIC 9(3)V9(2). 05 Growth PIC S9(3) SIGN IS LEADING. 05 Computation COMP-1.
The generated schema looks as following:
<?xml version="1.0" encoding="UTF-8" ?> <!--Native format was generated from COBOL copybook : D:\work\jDevProjects\CCB\Copybooks\numeric.cpy--> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:extn="http://xmlns.oracle.com/pcbpel/nxsd/extensions" targetNamespace="http://TargetNamespace.com/ccb/numeric" xmlns:tns="http://TargetNamespace.com/ccb/numeric" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:encoding="cp037" nxsd:byteOrder="bigEndian" nxsd:stream="bytes"> <xsd:element name="Numerics"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration :01 NUMERIC-FORMATS--> <xsd:element name="NUMERIC-FORMATS" minOccurs="1" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <!--COBOL declaration : 05 Salary PIC 9(5) COMP-3--> <xsd:element name="Salary" type="xsd:long" nxsd:style="comp3" extn:sign="unticked" extn:picSize="5"/> <!--COBOL declaration : 05 Rating PICTURE S9(5)--> <xsd:element name="Rating" type="xsd:string" nxsd:style="signZoned" extn:sign="ticked" extn:picSize="5" extn:signPosn="tailUpperNibble"/> <!--COBOL declaration : 05 Age PIC 9(3) USAGE COMP--> <xsd:element name="Age" type="xsd:long" nxsd:style="comp" extn:picSize="3" extn:sign="unticked"/> <!--COBOL declaration : 05 Revenue PIC 9(3)V9(2)--> <xsd:element name="Revenue" type="xsd:decimal" nxsd:style="virtualDecimal" extn:assumeDecimal="3" extn:picSize="5"/> <!--COBOL declaration : 05 Growth PIC S9(3) SIGN IS LEADING--> <xsd:element name="Growth" type="xsd:string" nxsd:style="signZoned" extn:sign="ticked" extn:picSize="3" extn:signPosn="headUpperNibble"/> <!--COBOL declaration : 05 Computation COMP-1--> <xsd:element name="Computation" type="xsd:float" nxsd:style="comp1" extn:sign="ticked"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
In this case, all the numeric types follow formats specified according to IBM COBOL formats. If the data file originates from a different system using different layouts, then the generated schema requires modification.
This section contains the following topics:
Fixed-length data in the native format can be defined in the native schema using the fixed-length style. There are three types of fixed length:
With padding
Without padding
With the actual length also being read from the native data
Native Data Format to Be Translated: With Padding
The actual data may be less than the length specified. In this case, you can specify the paddedBy
and padStyle
as head
or tail
. When the data is read, the pads are trimmed accordingly.
GBP*UK000012550.00
Native Schema: With Padding
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="fixedlength"> <complexType> <sequence> <element name="currency_code" nxsd:style="fixedLength" nxsd:length="4" nxsd:padStyle="tail" nxsd:paddedBy="*"> <simpleType> <restriction base="string"> <maxLength value="4" /> </restriction> </simpleType> </element> <element name="country_code" nxsd:style="fixedLength" nxsd:length="2" nxsd:padStyle="none"> <simpleType> <restriction base="string"> <length value="2" /> </restriction> </simpleType> </element> <element name="to_usd_rate" nxsd:style="fixedLength" nxsd:length="12" nxsd:padStyle="head" nxsd:paddedBy="0"> <simpleType> <restriction base="string"> <maxLength value="12" /> </restriction> </simpleType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: With Padding
<fixedlength xmlns="http://www.oracle.com/ias/processconnect"> <currency_code>GBP</currency_code> <country_code>UK</country_code> <to_usd_rate>12550.00</to_usd_rate> </fixedlength>
Native Data Format to Be Translated: Without Padding
To define a fixed-length data in native schema, you can use the fixed-length style. In case the actual data is less than the length specified, the white spaces are not trimmed.
GBP*UK000012550.00
Native Schema: Without Padding
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="fixedlength"> <complexType> <sequence> <element name="currency_code" nxsd:style="fixedLength" nxsd:length="4"> <simpleType> <restriction base="string"> <maxLength value="4" /> </restriction> </simpleType> </element> <element name="country_code" nxsd:style="fixedLength" nxsd:length="2"> <simpleType> <restriction base="string"> <length value="2" /> </restriction> </simpleType> </element> <element name="to_usd_rate" nxsd:style="fixedLength" nxsd:length="12"> <simpleType> <restriction base="string"> <maxLength value="12" /> </restriction> </simpleType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: Without Padding
<fixedlength xmlns="http://www.oracle.com/ias/processconnect"> <currency_code>GBP*</currency_code> <country_code>UK</country_code> <to_usd_rate>000012550.00</to_usd_rate> </fixedlength>
Native Data Format to Be Translated: Actual Length Also Being Read from the Native Data
When the length of the data is also stored in the native stream, this style is used to first read the length, and subsequently read the data according to the length read.
03joe13DUZac.1HKVmIY
Native Schema: Actual Length Also Being Read from the Native Data
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="fixedlength"> <complexType> <sequence> <element name="user" type="string" nxsd:style="fixedLength" nxsd:identifierLength="2" /> <element name="encr_user" type="string" nxsd:style="fixedLength" nxsd:identifierLength="2" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: Actual Length Also Being Read from the Native Data
<fixedlength xmlns="http://www.oracle.com/ias/processconnect"> <user>joe</user> <encr_user>DUZac.1HKVmIY</encr_user> </fixedlength>
This format is used when the terminating mark itself is supposed to be treated as part of the actual data and not as a delimiter. When it is not clear whether the mark is part of actual data or not, you can use the nxsd:quotedBy
to be safe. Specifying nxsd:quotedBy
means that the corresponding native data may or may not be quoted. If it is quoted, then the actual data is read from the begin quotation to the end quotation as specified in nxsd:quotedBy
. Otherwise, it is read until the terminatedBy
character is found.
The examples for the Optionally quoted and Not quoted scenarios are provided in following sections:
Native Data Format to Be Translated: Optionally Quoted
Fred,"2 Old Street, Old Town,Manchester",20-08-1954,0161-499-1718
Native Schema: Optionally Quoted
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="terminated"> <complexType> <sequence> <element name="PersonName" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </element>
Translated XML Using the Native Schema: Optionally Quoted
<terminated xmlns="http://www.oracle.com/ias/processconnect"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </terminated>
Native Data Format to Be Translated: Not Quoted
This is used when the data is terminated by a particular string or character.
1020,16,18,,1580.00
Native Schema: Not Quoted
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="terminated"> <complexType> <sequence> <element name="product" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="ordered" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="inventory" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="backlog" type="string" nxsd:style="terminated" nxsd:terminatedBy="," /> <element name="listprice" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: Not Quoted
<terminated xmlns="http://www.oracle.com/ias/processconnect"> <product>1020</product> <ordered>16</ordered> <inventory>18</inventory> <backlog></backlog> <listprice>1580.00</listprice> </terminated>
This is used when the native data is surrounded by a mark.
The following examples are provided:
Left and right surrounding marks are different
Left and right surrounding marks are the same
Native Data Format to Be Translated: Left and Right Surrounding Marks Are Different
(Ernest Hemingway Museum){Whitehead St.}
Native Schema: Left and Right Surrounding Marks Are Different
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://www.oracle.com/ias/processconnect" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="limstring"> <complexType> <sequence> <element name="Landmark" type="string" nxsd:style="surrounded" nxsd:leftSurroundedBy="(" nxsd:rightSurroundedBy=")" /> <element name="Street" type="string" nxsd:style="surrounded" nxsd:leftSurroundedBy="{" nxsd:rightSurroundedBy="}" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: Left and Right Surrounding Marks Are Different
<limstring xmlns="http://www.oracle.com/ias/processconnect"> <Landmark>Ernest Hemingway Museum</Landmark> <Street>Whitehead St.</Street> </limstring>
Native Data Format to Be Translated: Left and Right Surrounding Marks Are the Same
.FL..Florida Keys.+Key West+
Native Schema: Left and Right Surrounding Marks Are the Same
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://www.oracle.com/ias/processconnect" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="limstring"> <complexType> <sequence> <element name="State" type="string" nxsd:style="surrounded" nxsd:surroundedBy="."/> <element name="Region" type="string" nxsd:style="surrounded" nxsd:surroundedBy="." /> <element name="City" type="string" nxsd:style="surrounded" nxsd:surroundedBy="+" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema: Left and Right Surrounding Marks Are the Same
<limstring xmlns="http://www.oracle.com/ias/processconnect"> <State>FL</State> <Region>Florida Keys</Region> <City>Key West</City> </limstring>
This format applies to lists with the following characteristics:
All Items Separated by the Same Mark, But the Last Item Terminated by a Different Mark (Bounded)
All Items Separated by the Same Mark, Including the Last Item (Unbounded)
All Items Separated by the Same Mark, But the Last Item Terminated by a Different Mark (Bounded)
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
125,200,255
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="list" type="tns:Colors" /> <complexType name="Colors" nxsd:style="list" nxsd:itemSeparatedBy="," nxsd:listTerminatedBy="${eol}"> <sequence> <element name="Red" type="string" /> <element name="Green" type="string" /> <element name="Blue" type="string" /> </sequence> </complexType> </schema>
Translated XML Using the Native Schema:
<list xmlns="http://www.oracle.com/ias/processconnect"> <Red>125</Red> <Green>200</Green> <Blue>255</Blue> </list>
All Items Separated by the Same Mark, Including the Last Item (Unbounded)
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
configure;startup;runtest;shutdown;
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="list" type="tns:CommandSet" /> <complexType name="CommandSet" nxsd:style="list" nxsd:itemSeparatedBy=";"> <sequence> <element name="Cmd1" type="string" /> <element name="Cmd2" type="string" /> <element name="Cmd3" type="string" /> <element name="Cmd4" type="string" /> </sequence> </complexType> </schema>
Translated XML Using the Native Schema:
<list xmlns="http://www.oracle.com/ias/processconnect"> <Cmd1>configure</Cmd1> <Cmd2>startup</Cmd2> <Cmd3>runtest</Cmd3> <Cmd4>shutdown</Cmd4> </list>
This is for an array of complex types where the individual cells are separated by a separating character and the last cell of the array is terminated by a terminating character.
The following examples are provided:
All Cells Separated by the Same Mark, But the Last Cell Terminated by a Different Mark (Bounded)
All Items Separated by the Same Mark, Including the Last Item (Unbounded)
Cells Not Separated by Any Mark, But the Last Cell Terminated by a Mark (Bounded)
All Cells Separated by the Same Mark, But the Last Cell Terminated by a Different Mark (Bounded)
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717". Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718". "Smith, Bob",,,0161-499-1719.#
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"><element name="array"> <complexType> <sequence> <element name="Member" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="${eol}" nxsd:arrayTerminatedBy="#"> <complexType> <sequence> <element name="Name" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="." nxsd:quotedBy='"'/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
All Cells Separated by the Same Mark, Including the Last Cell (Unbounded)
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717". Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718". "Smith, Bob",,,0161-499-1719.
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="array"> <complexType> <sequence> <element name="Member" maxOccurs="unbounded" nxsd:style="array" nxsd:cellSeparatedBy="\r\n"> <complexType> <sequence> <element name="Name" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="." nxsd:quotedBy='"'/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
Cells Not Separated by Any Mark, But the Last Cell Terminated by a Mark (Bounded)
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717" Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718" "Smith, Bob",,,0161-499-1719 #
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="array"> <complexType> <sequence> <element name="Member" maxOccurs="unbounded" nxsd:style="array" nxsd:arrayTerminatedBy="#"> <complexType> <sequence> <element name="Name" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="\r\n" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<array xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </array>
The Number of Cells Being Read from the Native Data
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
3"Smith, John","1 Old Street, Old Town, Manchester",,"0161-499-1717" Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718" "Smith, Bob",,,0161-499-1719
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="arrayidentifierlength"> <complexType> <sequence> <element name="Member" maxOccurs="unbounded" nxsd:style="array" nxsd:arrayIdentifierLength="1"> <complexType> <sequence> <element name="Name" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="\r\n" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<arrayidentifierlength xmlns="http://www.oracle.com/ias/processconnect"> <Member> <Name>Smith, John</Name> <Address>1 Old Street, Old Town, Manchester</Address> <DOB></DOB> <Telephone>0161-499-1717</Telephone> </Member> <Member> <Name>Fred</Name> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </Member> <Member> <Name>Smith, Bob</Name> <Address></Address> <DOB></DOB> <Telephone>0161-499-1719</Telephone> </Member> </arrayidentifierlength>
Explicit Array Length
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
3;John;Steve;Paul;Todd;
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="array"> <annotation> <appinfo> <nxsd:variables> <nxsd:variable name="len" /> </nxsd:variables> </appinfo> </annotation> <complexType> <sequence> <element name="TotalMembers" type="string" nxsd:style="terminated" nxsd:terminatedBy=";"> <annotation> <appinfo> <nxsd:variables> <nxsd:assign name="len" value="${0}" /> </nxsd:variables> </appinfo> </annotation> </element> <element name="Member" type="string" minOccurs="0" maxOccurs="unbounded" nxsd:style="array,terminated" nxsd:arrayLength="${len}" nxsd:terminatedBy=";" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<array xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <TotalMembers>3</TotalMembers> <Member>John</Member> <Member>Steve</Member> <Member>Paul</Member> </array>
This section provides the following examples of conditional processing:
Processing One Element Within a Choice Model Group Based on the Condition
Processing elements based within a sequence model group on the condition
Processing One Element Within a Choice Model Group Based on the Condition
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
PO28/06/2004^|ABCD Inc.|Oracle OracleApps025070,000.00 Database 021230,000.00 ProcessCon021040,000.00 PO01/07/2004^|EFGH Inc.|Oracle Websphere 025070,000.00 DB2 021230,000.00 Eclipse 021040,000.00 SO29/06/2004|Oracle Apps|5 Navneet Singh PO28/06/2004^|IJKL Inc.|Oracle Weblogic 025070,000.00 Tuxedo 021230,000.00 JRockit 021040,000.00 IN30/06/2004;Navneet Singh;Oracle;Oracle Apps;5;70,000.00;350,000.00
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://www.oracle.com/ias/processconnect" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="container"> <complexType> <choice maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="2"> <element ref="tns:PurchaseOrder" nxsd:conditionValue="PO" /> <element ref="tns:SalesOrder" nxsd:conditionValue="SO" /> <element ref="tns:Invoice" nxsd:conditionValue="IN" /> </choice> </complexType> </element> <!-- PO --> <element name="PurchaseOrder" type="tns:POType"/> <complexType name="POType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy="^" /> <element name="Buyer" type="string" nxsd:style="surrounded" nxsd:surroundedBy="|" /> <element name="Supplier" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Items"> <complexType> <sequence> <element name="Line-Item" minOccurs="3" maxOccurs="3"> <complexType> <group ref="tns:LineItems" /> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> <group name="LineItems"> <sequence> <element name="Id" type="string" nxsd:style="fixedLength" nxsd:length="10" nxsd:padStyle="none"/> <element name="Quantity" type="string" nxsd:style="fixedLength" nxsd:identifierLength="2" /> <element name="Price" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </group> <!-- SO --> <element name="SalesOrder" type="tns:SOType" /> <complexType name="SOType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy="|" /> <element name="Item" type="string" nxsd:style="terminated" nxsd:terminatedBy="|" /> <element name="Quantity" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Buyer" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> <!-- INV --> <element name="Invoice" type="tns:INVType" /> <complexType name="INVType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Purchaser" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Seller" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Item" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Price" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Quantity" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="TotalPrice" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </schema>
Translated XML Using the Native Schema
<container xmlns="http://www.oracle.com/ias/processconnect"> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>ABCD Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>OracleApps</Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Database </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>ProcessCon</Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <PurchaseOrder> <Date>01/07/2004</Date> <Buyer>EFGH Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Websphere </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>DB2 </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>Eclipse </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <SalesOrder> <Date>29/06/2004</Date> <Item>Oracle Apps</Item> <Quantity>5</Quantity> <Buyer>Navneet Singh</Buyer> </SalesOrder> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>IJKL Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Weblogic </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Tuxedo </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>JRockit </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <Invoice> <Date>30/06/2004</Date> <Purchaser>Navneet Singh</Purchaser> <Seller>Oracle</Seller> <Item>Oracle Apps</Item> <Price>5</Price> <Quantity>70,000.00</Quantity> <TotalPrice>350,000.00</TotalPrice> </Invoice> </container>
Processing Elements Within a Sequence Model Group Based on the Condition
Following sections explain the format of the data to be translated, the native schema, and the translated XML.
Native Data Format to Be Translated:
PO28/06/2004^|ABCD Inc.|Oracle OracleApps025070,000.00 Database 021230,000.00 ProcessCon021040,000.00 PO01/07/2004^|EFGH Inc.|Oracle Websphere 025070,000.00 DB2 021230,000.00 Eclipse 021040,000.00 SO29/06/2004|Oracle Apps|5 Navneet Singh PO28/06/2004^|IJKL Inc.|Oracle Weblogic 025070,000.00 Tuxedo 021230,000.00 JRockit 021040,000.00 IN30/06/2004;Navneet Singh;Oracle;Oracle Apps;5;70,000.00;350,000.00
Native Schema:
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://www.oracle.com/ias/processconnect" targetNamespace="http://www.oracle.com/ias/processconnect" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="container"> <complexType> <sequence maxOccurs="unbounded"> <element ref="tns:PurchaseOrder" minOccurs="0" nxsd:startsWith="PO" /> <element ref="tns:SalesOrder" minOccurs="0" nxsd:startsWith="SO" /> <element ref="tns:Invoice" minOccurs="0" nxsd:startsWith="IN" /> </sequence> </complexType> </element> <!-- PO --> <element name="PurchaseOrder" type="tns:POType"/> <complexType name="POType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy="^" /> <element name="Buyer" type="string" nxsd:style="surrounded" nxsd:surroundedBy="|" /> <element name="Supplier" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Items"> <complexType> <sequence> <element name="Line-Item" minOccurs="3" maxOccurs="3"> <complexType> <group ref="tns:LineItems" /> </complexType> </element> </sequence> </complexType> </element> </sequence> </complexType> <group name="LineItems"> <sequence> <element name="Id" type="string" nxsd:style="fixedLength" nxsd:length="10" nxsd:padStyle="none"/> <element name="Quantity" type="string" nxsd:style="fixedLength" nxsd:identifierLength="2" /> <element name="Price" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </group> <!-- SO --> <element name="SalesOrder" type="tns:SOType" /> <complexType name="SOType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy="|" /> <element name="Item" type="string" nxsd:style="terminated" nxsd:terminatedBy="|" /> <element name="Quantity" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Buyer" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> <!-- INV --> <element name="Invoice" type="tns:INVType" /> <complexType name="INVType"> <sequence> <element name="Date" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Purchaser" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Seller" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Item" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Price" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="Quantity" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" /> <element name="TotalPrice" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </schema>
Translated XML Using the Native Schema:
<container xmlns="http://www.oracle.com/ias/processconnect"> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>ABCD Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>OracleApps</Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Database </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>ProcessCon</Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <PurchaseOrder> <Date>01/07/2004</Date> <Buyer>EFGH Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Websphere </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>DB2 </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>Eclipse </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <SalesOrder> <Date>29/06/2004</Date> <Item>Oracle Apps</Item> <Quantity>5</Quantity> <Buyer>Navneet Singh</Buyer> </SalesOrder> <PurchaseOrder> <Date>28/06/2004</Date> <Buyer>IJKL Inc.</Buyer> <Supplier>Oracle</Supplier> <Items> <Line-Item> <Id>Weblogic </Id> <Quantity>50</Quantity> <Price>70,000.00</Price> </Line-Item> <Line-Item> <Id>Tuxedo </Id> <Quantity>12</Quantity> <Price>30,000.00</Price> </Line-Item> <Line-Item> <Id>JRockit </Id> <Quantity>10</Quantity> <Price>40,000.00</Price> </Line-Item> </Items> </PurchaseOrder> <Invoice> <Date>30/06/2004</Date> <Purchaser>Navneet Singh</Purchaser> <Seller>Oracle</Seller> <Item>Oracle Apps</Item> <Price>5</Price> <Quantity>70,000.00</Quantity> <TotalPrice>350,000.00</TotalPrice> </Invoice> </container>
This example shows how to define dates.
Native Data Format to Be Translated
11/16/0224/11/02 11-20-2002 23*11*2002 01/02/2003 01:02 01/02/2003 03:04:05
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="dateformat"> <complexType> <sequence> <element name="StartDate" type="dateTime" nxsd:dateFormat="MM/dd/yy" nxsd:style="fixedLength" nxsd:length="8" /> <element name="EndDate" type="dateTime" nxsd:dateFormat="dd/MM/yy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Milestone" type="dateTime" nxsd:dateFormat="MM-dd-yyyy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="DueDate" type="dateTime" nxsd:dateFormat="dd*MM*yyyy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm:ss" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<dateformat xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <StartDate>2002-11-16T00:00:00</StartDate> <EndDate>2002-11-24T00:00:00</EndDate> <Milestone>2002-11-20T00:00:00</Milestone> <DueDate>2002-11-23T00:00:00</DueDate> <Date>2003-01-02T01:02:00</Date> <Date>2003-01-02T03:04:05</Date> </dateformat>
Note:
nxsd:dateParsingMode="lax/strict"
and locale support have been added to the existing date format.The following example depicts the use of nxsd:dateParsingMode="lax/strict"
and locale support.
Native Data Format to Be Translated
11/16/0224/11/02 11-20-2002 23*11*2002 01/02/2003 01:02 01/02/2003 03:04:05 Thu, 26 May 2005 15:50:11 India Standard Time Do, 26 Mai 2005 15:43:10 Indische Normalzeit 20063202
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="dateformat"> <complexType> <sequence> <element name="StartDate" type="date" nxsd:dateFormat="MM/dd/yy" nxsd:localeLanguage="en" nxsd:style="fixedLength" nxsd:length="8" /> <element name="EndDate" type="date" nxsd:dateFormat="dd/MM/yy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Milestone" type="dateTime" nxsd:dateFormat="MM-dd-yyyy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="DueDate" type="dateTime" nxsd:dateFormat="dd*MM*yyyy" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="Date" type="dateTime" nxsd:dateFormat="MM/dd/yyyy hh:mm:ss" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="LongDateInEnglish" type="dateTime" nxsd:dateFormat="EEE, d MMM yyyy HH:mm:ss zzzz" nxsd:localeLanguage="en" nxsd:localeCountry="US" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="LongDateInGerman" type="dateTime" nxsd:dateFormat="EEE, d MMM yyyy HH:mm:ss zzzz" nxsd:localeLanguage="de" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> <element name="InvalidDate" type="dateTime" nxsd:dateParsingMode="lax" nxsd:dateFormat="yyyyMMdd" nxsd:style="terminated" nxsd:terminatedBy="${eol}" /> </sequence> </complexType> </element> </schema>
Translated XML
<dateformat xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <StartDate>2002-11-16</StartDate> <EndDate>2002-11-24</EndDate> <Milestone>2002-11-20T00:00:00</Milestone> <DueDate>2002-11-23T00:00:00</DueDate> <Date>2003-01-02T01:02:00</Date> <Date>2003-01-02T03:04:05</Date> <LongDateInEnglish>2005-05-26T15:50:11</LongDateInEnglish> <LongDateInGerman>2005-05-26T15:43:10</LongDateInGerman> <InvalidDate>2008-08-02T00:00:00</InvalidDate> </dateformat>
This example shows how to use variables.
Native Data Format to Be Translated
{,;}Fred,"2 Old Street, Old Town,Manchester","20-08-1954";"0161-499-1718" phone-2 phone-3
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="variable"> <annotation> <documentation> 1. var1 - variable declaration 2. var2 - variable declaration with default value 3. EOL - variable declaration with referencing a system variable </documentation> <appinfo> <junkies/> <nxsd:variables> <nxsd:variable name="var1" /> <nxsd:variable name="var2" value="," /> <nxsd:variable name="SystemEOL" value="${system.line.separator}" /> </nxsd:variables> <junkies/> <junkies/> <junkies/> </appinfo> </annotation> <complexType> <sequence> <element name="delims" type="string" nxsd:style="surrounded" nxsd:leftSurroundedBy="{" nxsd:rightSurroundedBy="}" > <annotation> <appinfo> <junkies/> <junkies/> <junkies/> <nxsd:variables> <nxsd:assign name="var1" value="${0,1}"/> <nxsd:assign name="var2" value="${1}" /> </nxsd:variables> </appinfo> </annotation> </element> <element name="PersonName" type="string" nxsd:style="terminated" nxsd:terminatedBy="${var1}" nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="${var1}" nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="${var2}" nxsd:quotedBy='"'/> <element name="Telephone1" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> <element name="Telephone2" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> <element name="Telephone3" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<variable xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <delims>,;</delims> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone1>0161-499-1718</Telephone1> <Telephone2>phone-2</Telephone2> <Telephone3>phone-3</Telephone3> </variable>
In native format; when the data is read, it prefixes or suffixes data specified with prefix, suffix, or both, as shown in the following example.
Native Data to Be Translated
Fred,"2 Old Street, Old Town,Manchester","20-08-1954",0161-499-1718
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD" > <element name="terminated"> <complexType> <sequence> <element name="PersonName" type="string" nxsd:prefixWith="Mr." nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:suffixWith="]]" nxsd:prefixWith="[[" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated XML Using the Native Schema
<terminated xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Mr.Fred</PersonName> <Address>[[2 Old Street, Old Town,Manchester]]</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </terminated>
The translator will skip, before or after the data is read depending on the skipMode
, as shown in the following example:
Native Data to Be Translated
Fred,"2 Old Street, Old Town,Manchester","20-08-1954",0161-499-1718
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD" > <element name="terminated"> <complexType> <sequence> <element name="PersonName" type="string" nxsd:skip="5" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:skipMode="before" nxsd:skip="3" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:skipMode="after" nxsd:skip="6" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated XML Using Native Schema
<terminated xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>99-1718</Telephone> </terminated>
fixed
and default
valuesWhen an element is declared without nxsd
annotations, but the values specified is either, fixed
or default
, then the translator should just use that value and move on, and not throw any exception.
Native Data to Be Translated
Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718"
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="terminated"> <annotation> <appinfo> <nxsd:variables> <nxsd:variable name="x" value="hello" /> </nxsd:variables> <junkies/> <junkies/> <junkies/> </appinfo> </annotation> <complexType> <sequence> <element name="PersonName" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Age" type="string" fixed="16" /> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="salutation" type="string" default="${x}" /> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated XML Using Native Schema
<terminated xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Fred</PersonName> <Age>16</Age> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <salutation>hello</salutation> <Telephone>0161-499-1718</Telephone> </terminated>
write
write
writes the literal at the current position in the output stream, either before writing the actual data or after writing it.
Input XML
<terminated xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </terminated>
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD" > <element name="terminated"> <complexType> <sequence> <element name="PersonName" type="string" nxsd:writeMode="before" nxsd:write="Mr." nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:writeMode="after" nxsd:write="Over." nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated Data Using Native Schema
Mr.Fred,"2 Old Street, Old Town,Manchester",Over.20-08-1954,0161-499-1718
LookAhead
are available in two types:
Type 1: LookAhead
X chars, read the value from a position using a style, and match against the specified literal.
Type 2: LookAhead
X chars, read the value from a position using a style, and store that value in a variable to be used later.
LookAhead: Type 1
In native schema, LookAhead X chars
, read the value from a position using a style, and store that value in a variable to be used later.
Native Data Format to Be Translated
Name1,"2 Old Street, Old Town,Manchester",20-08-1954,"0161-499-1718", YES Name2,"2 Old Street, Old Town,Manchester",20-08-1954,"0161-499-1718", NO Name3,"2 Old Street, Old Town,Manchester",20-08-1954,"0161-499-1718", NO Name4,"2 Old Street, Old Town,Manchester",20-08-1954,"0161-499-1718", YES
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <!-- nxsd:lookAhead="70" nxsd:scan="3" --> <element name="LookAhead"> <complexType> <choice maxOccurs="unbounded" nxsd:choiceCondition="${x}" nxsd:lookAhead="70" nxsd:scanLength="3" nxsd:assignTo="${x}"> <element name="Record1" type="string" nxsd:conditionValue="YES" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:skipMode="after" nxsd:skipUntil="${eol}" /> <element name="Record2" type="string" nxsd:conditionValue="NO " nxsd:style="terminated" nxsd:terminatedBy="," nxsd:skipMode="after" nxsd:skipUntil="${eol}" /> </choice> </complexType> </element> </schema>
Translated XML Using Native Schema
<LookAhead xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <Record1>Name1</Record1> <Record2>Name2</Record2> <Record2>Name3</Record2> <Record1>Name4</Record1> </LookAhead>
LookAhead: Type 2
LookAhead X chars
, read the value from a position using a style, and match against the specified literal.
Native Data Format to Be Translated
Fred,"2 Old Street, Old Town,Manchester","20-08-1954","0161-499-1718",YES
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD"> <element name="LookAhead"> <complexType> <sequence minOccurs="0" nxsd:lookAhead="70" nxsd:lookFor="YES"> <element name="PersonName" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated XML Using Native Schema
<LookAhead xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </LookAhead>
outboundHeader
The actual content of outboundHeader
can use variables, specifically ${eol}
. When headerLines
and outboundHeader
both are available, outboundHeader
takes precedence in the outbound.
Note:
In the inbound direction, skipping headers feature is supported. Only predefined variables can be used in a header because other variables might either not be accessible or would have only literals.Input XML
<terminated xmlns="http://xmlns.oracle.com/pcbpel/nxsd/smoketest"> <PersonName>Fred</PersonName> <Address>2 Old Street, Old Town,Manchester</Address> <DOB>20-08-1954</DOB> <Telephone>0161-499-1718</Telephone> </terminated>
Native Schema
<?xml version="1.0" encoding="US-ASCII"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/nxsd/smoketest" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:stream="chars" nxsd:version="NXSD" nxsd:hasHeader="true" nxsd:outboundHeader="This is a header ${eol}"> <element name="terminated"> <complexType> <sequence> <element name="PersonName" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy=""" /> <element name="Address" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="""/> <element name="DOB" type="string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy='"'/> <element name="Telephone" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy='"'/> </sequence> </complexType> </element> </schema>
Translated Data
This is a header Fred,"2 Old Street, Old Town,Manchester",20-08-1954,0161-499-1718
Table 7-4 shows the constructs applicable only on the <schema>
tag.
Table 7-4 Constructs Applicable Only on the <schema> Tag
Construct | Description |
---|---|
The byte order of the native data as |
|
The encoding in which the actual data is stored. Any legal encoding supported by |
|
A positive integer specifying the number of lines to be skipped, before translating the native data. |
|
Skip until the specified string, before translating the native data. |
|
If declared, adds the standalone attribute in the XML declaration prolog of the translated XML, with the actual value as that specified in |
|
Whether the data is stored as characters or bytes. Allowed values are |
|
String specifying the unique message separator in the native data, in case of a batch of messages. |
|
The type of native data. Possible values are |
|
If declared, adds the XML declaration prolog to the translated XML with the actual value as that specified in |
Table 7-5 shows the constructs applicable on all tags other than the <schema>
tag.
Table 7-5 Constructs Applicable On All Tags Other Than the <schema> Tag
Construct | Description |
---|---|
The length of the array being stored in the native data occupying the specified length |
|
The value of this construct is used as the length of the array, which can also be a variable resolved to a valid number. This value overrides any nxsd:style="array" nxsd:arrayLength="10" This indicates that the array length is |
|
The last item in the array being terminated by the specified string |
|
Assigns a value to the variable already declared |
|
The cells of the array in the native data being separated by the specified string |
|
Either |
|
Matches the string read from the native stream for the |
|
A valid Java date format representing the date in the native data |
|
The number of characters and bytes in which the actual length of the data is stored |
|
The items in the list being separated by the specified string |
|
The native data surrounded |
|
The length of the native data to be read. Used with fixed-length style. |
|
The last item in the list being terminated by the specified string |
|
Looks for a match ahead of the current position in the input stream. If a match is found, then the node on which this construct is specified is processed; otherwise, it is skipped. Use this feature as follows: nxsd:lookAhead="20" nxsd:lookFor="abc" This indicates to skip |
|
The string used for padding |
|
|
|
The native data being quoted by the specified string |
|
Skips the specified number of bytes or characters |
|
Skips the number of lines specified |
|
Skips until the string specified |
|
Looks for the specified string in the native data. If it exists, then proceeds with the element where it is specified; otherwise, skips and processes the next element. |
|
The style used to read the native data from the input stream. Allowed values are |
|
The native data being surrounded by the specified string |
|
The native data being terminated by the string specified |
|
Declares a single variable |
|
Declares a set of variables or assigns the already declared variables a valid value |