Skip to main content

CSP Mark-Up Language

CSP Mark-Up language consists of a set of tags that can be used to control the flow of page execution. The tags provide abstractions of ObjectScript and Caché Basic functionality. They allow developers without detailed knowledge of either ObjectScript or Basic to create dynamic CSP pages. Here are descriptions of a few tags:

Some CSP Tags
Tag Attributes Description


  • page: URL of the included page.

Use to incorporate the content of one page into another. A mechanism for modularizing page content throughout an application.


  • counter: variable holding a value that changes with each iteration.

  • from: initial value of counter.

  • to: final value of counter. When counter reaches this value, loop iteration stops.

  • step: counter's increment on each iteration.

Provides the functionality of an ObjectScript or Basic for loop. Repeats a code block a fixed number of times.


  • condition: the controlling condition for the loop. The loop terminates when evaluation of the condition returns false.

  • counter: an optional variable whose value changes with each loop iteration. Starting value is 1. Increment is 1.

Provides the functionality of an ObjectScript of Basic while loop. Repeats a code block until evaluation of the controlling condition yields false. Note that the evaluation of condition occurs before counter is incremented. The counter variable counts the number of times that the loop executes.

Some More CSP Tags
Tag Attributes Description

<csp:if>, <csp:elseif>, <csp:else>

  • condition: the controlling condition for the code block. Code block executes when evaluation of condition yields true.

Provides the functionality of the ObjectScript or Basic if, elseif, else conditional structure. Nest several <csp:elseif> and/or a final <csp:else> within the scope of <csp:if>.


  • name: reference for the returned %ResultSetOpens in a new tab object.

  • classname: name of the class containing the query.

  • queryname: name of the query.

  • P1,P2,...,PN: query parameter values.

Executes a class query defined in a Caché class. Returns a %ResultSetOpens in a new tab object containing the query results to the CSP code. Use <csp:while> to iterate through the results.



Delimits a comment within a CSP page. The comment is not included in the content sent to the client. To include comments that are sent to the client, use HTML-style comment delimiters: <!-- -->.


To learn more about CSP tags, read Tag-Based Development with CSP in Using Caché Server Pages. For a list of CSP tags, read CSP Tags in the HTML CSP Tag Reference.

FeedbackOpens in a new tab