7 1 Create a Technology Service

LANSA WAM

7.1 Create a Technology Service

To create a Technology Service, follow these steps:

Step 1. Create a Technology Service

Step 2. Create the Technology Service XSL Stylesheets

Step 2a. Create the WebRoutine TSP Stylesheet

Step 2b. Create the Weblet TSP Stylesheet

Step 2c. Copy your Technology Service Stylesheets to the TSP directory

Step 1. Create a Technology Service

You create a Technology Service using the LANSA Editor. The Provider and Technology Service name uniquely identify the Technology Service.

When you create a Technology Service you define its properties. The properties store definitions and options used by the LANSA Editor and the WAM runtime.

Also see

Editing Provider Definitions in the Visual LANSA User Guide

Technology Services in the Technical Reference Guide

Step 2. Create the Technology Service XSL Stylesheets

How WAMs use XSL stylesheets to transform the WebRoutine XML document into different presentation formats and the purpose of Technology Services, is described earlier in this guide. Refer to WAMs Deconstructed.

LANSA uses XSL stylesheets itself to generate the WebRoutine XML document and the WebRoutine XSL stylesheet for a Technology Service as shown here:

When XSL is generated for a WebRoutine, LANSA generates an in-memory XML document named the Technology Service Markup Language (TSML) document. This is the input document used to create both the WebRoutine LXML document and the WebRoutine XSL stylesheet. A similar process is followed for the WAM layout weblet.

When you create a Technology Service you need to provide two TSP stylesheets:

  • the first one to generate the WebRoutine XSL stylesheet
  • the second one to generate the WAM layout weblet.

Your TSP Stylesheets must be encoded for UTF-8. That is, it should include the statement <?xml version="1.0" encoding="UTF-8" ?>
The XSL used for transformation of the XML WebRoutine document conforms with the standard W3C XSL 1.0 specification. Refer to XSL 1.0 references for information.

The Global LXML stylesheets are the same, regardless of Technology Service. You don't need to create your own.

Refer to these sections for information about the Technology Service Markup Language document:

7.2 TSML Document Structure

7.3 TSML Document Example

Step 2a. Create the WebRoutine TSP Stylesheet

The WebRoutine TSP stylesheet is used to create the WebRoutine XSL stylesheet as shown in the diagram in Step 2.

You must follow this naming convention (Name must be all lower-case):

tsp_<provider>_<technology_service_name>_WebRoutine.xsl

Where <provider> is the Technology Service Provider and <technology_service_name> is the Technology Service name. For example, for LANSA:XHTML the WebRoutine TSP stylesheet name is:

tsp_lansa_xhtml_WebRoutine.xsl

The easiest way of creating a WebRoutine TSP stylesheet is to base it on the ones provided by LANSA.

The shipped WebRoutine TSP stylesheets have two top-level parameters (g_inliner_call and g_import_path). These are used to support inline lists. An inliner call is when the generator needs to insert the inline weblet.

 

Step 2b. Create the Weblet TSP Stylesheet

The Weblet TSP stylesheet is used to create the WAM Layout Weblet. When you create a WAM, LANSA checks if it has a Layout weblet. If it doesn't have one, it uses this TSP stylesheet to create one.

You must follow this naming convention (Name must be all lower-case):

tsp_<provider>_<technology_service_name>_webletbuilder.xsl

Where <provider> is the Technology Service Provider and <technology_service_name> is the Technology Service name. For example, for LANSA:XHTML the Weblet TSP stylesheet name is:

tsp_lansa_xhtml_webletbuilder.xsl

The easiest way of creating a Weblet TSP stylesheet is to base it on the ones provided by LANSA.

Note: The shipped Weblet TSP stylesheets have templates for creating other weblets. Currently the only weblet you need to implement in your TSP stylesheet is the Layout weblet.

 

Step 2c. Copy your Technology Service Stylesheets to the TSP directory

All TSP stylesheets must be placed in the TSP directory:

... <sysdir>\web\tsp

IBM i and Unix/Linux: ... <lansa root>/x_lansa/web/tsp