[Inso Home Page] [Home] [Collection] [Book] [Expand] [Collapse] [Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] [Preferences] [Print] [Help]

 inside  Expand Search


   Hyperlinks   [Table of Contents]  3. Overview of DynaWeb Configuration Files

DynaWeb Publishers Guide

[-] 2. Publishing DynaText Books Using DynaWeb
[-] TCL() PVF

TCL() PVF

The TCL PVF allows publishers to access Tcl and the Tcl extensions for DynaWeb from a PVF inside a stylesheet. Publishers can use the DynaWeb Tcl extensions to access and modify the HTTP header information from their stylesheets.

Syntax

The TCL PVF can be inserted into stylesheets in the same manner as any PVF. The syntax for the TCL PVF is:

TCL("[TCL_COMMAND]")

The value of [TCL_COMMAND] must be surrounded by quotes and must be a valid Tcl extension. Due to limitations in the nature of TOC and content generation, the Tcl extensions that deal with TOC and content generation cannot be used with the TCL PVF. A list of valid and invalid Tcl extensions follows this section.

Note: If you use the Tcl commands dwCall or dwProcessTemplate in a TCL PVF, the returned value of the command is substituted in place of the TCL PVF. For example, if in a TCL PVF, you call a script that resolves to either true or false, the returned value will be substituted for the TCL PVF. In the following example, the figure will be hidden depending on the returned value of the script ShowFigures, which looks at the URL to see whether the user has turned off displaying figures and returns either a value of "true" or "false".

<STYLE name="FIGURE"> 
    <hide> TCL("dwCall ShowFigures") </>
</STYLE>

After the script is called, the TCL PVF is replaced with the value of ShowFigures.

<STYLE name="FIGURE">
    <hide> true   </>
</STYLE>

Valid Tcl Extensions for Use with the TCL PVF


HTTP-Related Tcl Extensions

dwGetContentLen

dwGetHttpField

dwGetUserAgent

dwGetContentType

dwGetProtocol

dwQueryCapability

URL-Related Tcl Extensions

dwUrlDecode

dwGetUrlParam

dwSetUrlParam

dwDelUrlParam

dwGetUrlParams

dwSetUrlParams

dwDelUrlQueryParams

dwGetUrlPath

dwSetUrlPath

dwUrlEncode

dwGetUrlPort

dwSetUrlPort

dwGetUrl

dwGetUrlPrefix

dwSetUrlPrefix

dwGetUrlFragment

dwGetUrlQueryParam

dwSetUrlQueryParam

dwGetUrlLastPathSegment

dwGetUrlQueryParams

dwSetUrlQueryParams

dwGetUrlLastPathSegmentSuffix

dwGetUrlScheme

dwSetUrlScheme

dwGetUrlNthPathSeg

dwGetUrlServer

dwSetUrlServer

dwGetUrlNumPathSegs

dwSetUrlFragment

Utility Tcl Extensions

dwCall

dwReturn

dwSet

dwSource

dwGet

dwSend

dwProcessTemplate

dwSendRedirect

dwFlushPipe

Invalid Tcl Extensions for Use with the TCL PVF


dwGetTocItemAlias

dwGetTocItemRelevance

dwNewTocLine

dwGetTocItemExpansionPath

dwGetTocItemState

dwSetTocMaxLinesHint

dwGetTocItemHitCount

dwGetTocItemTitle

dwTocItemContainsSelection

dwGetTocItemLevel

dwGetTocItemType

dwTocItemIsSelected

dwGetTocItemPath

dwGetTocNumEntries

dwTocItemIsSelectionParent

dwGetTocItemPosition

dwGetSelectedTocItemPosition

Page-Related Tcl Extensions

dwGetPageInterrupt

dwGetPageText

dwSendPageText

dwGetPageInterruptInfo

dwInitPageTextGenerator

dwSetPageMaxBytesHint


   Hyperlinks   [Table of Contents]  3. Overview of DynaWeb Configuration Files