Description: The <apiSyntaxText> element provides the representation in the programming language for the declared interface for the API item.

# apiSyntaxText

The <apiSyntaxText> element provides the representation in the programming language for the declared interface for the API item.

#### Description

In the <apiDef> element, the <apiSyntaxText> element can supplement or replace the semantic declaration of the same interface. When a specialization provides a complete representation of the interface within a specialized <apiDef> element, the <apiSyntaxText> element can be omitted. The Java DITA API reference takes this approach.

#### Example

The following example shows a simple <apiSyntaxText> element for a Visual Basic method:

    <apiOperationDetail>
          <apiImpl>Method</apiImpl>
          <apiSyntax>
             <apiSyntaxText>
                Public Function getApplicableStereotypesAsString( <┘
                <apiItemName>delimiterOPT</apiItemName> <┘
                As String) <┘
                As String <┘
             </apiSyntaxText>
             <apiSyntaxItem>
               <apiItemName>delimiterOPT</apiItemName>
               <apiDefNote>A string that provides the text that you want to use
                  to separate the stereotype names.</apiDefNote>
             </apiSyntaxItem>
             <apiSyntaxItem>
               <apiItemName>string</apiItemName>
               <apiDefNote>One or more strings to interpolate.</apiDefNote>
             </apiSyntaxItem>
          </apiSyntax>
    </apiOperationDetail>

#### Contained by

apiSyntax

#### Contains

apiData, apiItemName, apiname, apiRelation, apiType, cmdname, draft-comment, fn, indexterm, indextermref, keyword, msgnum, option, parmname, required-cleanup, varname, wintitle

#### Content model

(text data or apiRelation or apiType or apiItemName or apiData or keyword or option or parmname or apiname or cmdname or msgnum or varname or wintitle or draft-comment or required-cleanup or fn or indextermref or indexterm) (any number)

#### Inheritance

topic/pre reference/pre

- apiRelation
  The <apiRelation> element specifies a related API item that is part of the declared interface to this API item.
- apiType
  The <apiType> element specifies a type defined by the language itself that is part of the declared interface to this API item.
- apiItemName
  The <apiItemName> element provides the name for substructure of an interface such as parameter of an operation or subfield of a method.
- apiData
  The <apiData> element specifies the actual value such as the initial value of variable, the default value of a parameter, or the value of a constant.

Parent topic: apiSyntax