XSLT Stylesheet Syntax

XSLT stylesheet must follow SAP Mobile Platform stylesheet syntax requirements so that the Web service response message is formatted correctly for MBOs bound to this datasource.

The stylesheet is applied to different parts of the Web service response message, depending on the type:
  • For SOAP web service response messages, the stylesheet is applied to the contents of the SOAP body.
  • For REST web service messages, the stylesheet is applied to the contents of the HTTP response body.
Stylesheet elements
Element Description Contains
Data The root element of the stylesheet. One or more Record elements.
Record The element that corresponds to a row in the tabular MBO data structure.

The first Record element resulting from the transform describes the column using metadata (that is, names, data types, nullability, and so on). The Record element has no attributes, except when it is a metadata element.

The contents of the Field elements should match the corresponding op_label values. The Record or Field values from this first Record element will not appear in the resulting tabular data structure.

One or more Field elements.
Field The element that corresponds to the column value. The Field element has a number of attributes that can be used. One or more attributes. See the Attributes table.
Attributes
Attribute Applicability Description
op_label Required by the stylesheet and the resulting transformed structure's metadata. Ignored by the data field elements. The column name.
op_position Required by all. The attribute's position in the tabular structure. The first attribute is at position 1
op_nullable Required by the stylesheet and the resulting transformed structure's metadata. Ignored by the data field elements. Whether (TRUE) or not (FALSE) the attribute is nullable.
op_datatype Required by the stylesheet and the resulting transformed structure's metadata. Ignored by the data field elements. The data type. Supported values inlclude STRING, INT, LONG, BOOLEAN, DECIMAL, BINARY, FLOAT, DOUBLE, DATE, TIME, DATETIME, CHAR, BYTE, SHORT, INTEGER. See Datatype Support.
op_xsdtype Required by the stylesheet and the resulting transformed structure's metadata. Ignored by the data field elements. The XML schema primitive type name corresponding to this attribute.