---
name: "fdxml"
section: "1"
platform: "linux"
package: "framerd"
version: "2.4.1-1.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/fdxml"
---

# fdxml(1)

convert an FDXML document to XHTML

## NAME

fdxml - convert an FDXML document to XHTML

## SYNOPSIS

**fdxml** *filename* **\[** *query* **\]**

This reads an FDXML document and produces an XHTML document.  FDXML is actually a superset of XHTML, which can be extended by new elements implemented by Scheme procedures.

## DESCRIPTION

This is designed primarily to be called by a web server to dynamically render FDXML documents into HTML.

When started, it uses both the execution environment and the standard input to set up a slotmap containing information about the request for the document.  It then reads the XML document in *filename* which may read certain special processing instructions to define specialized element types.  These element types invoke FDScript code to translate themselves into HTML.  They can also access the variables of the document request.

## DIRECTIVES

The  **fdxml** preprocessor handles the following processing instructions:

**\<?framerd module** *module\_name* **\>**

loads the module  *module\_name* and uses its exported symbols to implement elements in the document.

**\<?framerd pool** *pool\_spec* **\>**

access the pool specified by *pool\_spec*

**\<?framerd index** *index\_spec* **\>**

adds the index specified by *index\_spec* to the background

**\<?framerd load** *filename* **\>**

loads the file *filename* interpreting the path relative to the directory where the .fdxml file is located.  The file will be loaded into its own module and the symbols exported from the module will be available as elements in the FDXML file.

## CONVENTIONS

The procedure implementing an element takes a single argument, which is a parsed XML object.  The following primitives can be applied to this argument:

- xml-attributes

  Returns the attributs of the XML element as an alternating list of keyword and values.

- xml-content

  Returns the content of the XML element

- xml-get

  Returns the attribute named TAG of the parsed xml data XML.  If there is no such attribute, the subelement name SLOT (of the items content) is returned

- xml-getall

  Returns all the subelements of XML with element type SLOT

## ENVIRONMENT

The following variables are typically bound and accessible on the **(CGI-DATA)** slotmap as well as through  **(CGI-INIT)** and **(CGI-VAR)**

- SERVER\_SOFTWARE

  The type and version of the web server passing on this CGI request

- SERVER\_NAME

  The name of the server passing on the request

- SERVER\_PORT

  The port on which the server is listening

- SCRIPT\_NAME

  The name of the script being run

- HTTP\_REFERER

  If provided, this is the document from which this script was invoked

- HTTP\_USER\_AGENT

  The kind of program making the request, often the web browser being used by the human requestor

- REMOTE\_IDENT

  Rarely provided, this is an identifier of the individual making the reauest

- REMOTE\_HOST

  This is the hostname of the machine from which the request apparently originated.

- REMOTE\_ADDR

  This is the IP address (dd.dd.dd.dd) of the machine from which the request apparently originated.

- PATH\_INFO

  This is the part of the URL which occurs after the script name but before any parameters

- DOCUMENT\_ROOT

  This is the document root

- PATH\_TRANSLATED

  This is the local file to which this request was translated

- AUTH\_TYPE

  This describes how the user authenticated her/him/itself.

- REMOTE\_USER

  This describes who the user authenticated her/him/itself as.

- HTTP\_COOKIE

  This is the "cookie" passed with this request.  The individual components of this cookie are separated out into separate fields in the **CGI-DATA** slotmap

- SERVER\_HOST

  This is host on which the server is running.  This will differ from  **SERVER\_NAME** only if virtual hosts are being used

- HTTPS

  This is true if the connection with client is a secure (SSL) connection.

- HTTP\_ACCEPT

  - HTTP\_ACCEPT\_CHARSET

  - HTTP\_ACCEPT\_ENCODING

  - HTTP\_ACCEPT\_LANGUAGE

  - REQUEST\_METHOD

  This is the request method.  Only  **GET** and **POST** are currently handled

- CONTENT\_TYPE

  This is the mime time of any data sent with the request

- CONTENT\_LENGTH

  This is the number of bytes of data sent along with the request

- QUERY\_STRING

  This is the query string passed with the request.  If it provides form variables (common when the REQUEST\_METHOD is GET), these variables are each broken out and assigned to the slotmap.

- POST\_DATA

  This is the actual data sent along with the request.  If the mime type is a text type, this is a string; otherwise, it is a packet.  If the post data contains form variables (either url-encoded or mime-encoded), these are broken out

- PARSED\_POST

  When the posted data is a multi-part mime document, this is the parsed document.

## BUGS

## Revision Info

**$Id: fdxml.1,v 1.1 2002/05/29 18:38:01 haase Exp $**

## AUTHOR

Ken Haase \< kh@beingmeta.com \>

## SEE ALSO

[**fdxml**(1)](/fdxml/1.md) [**fdservlet**(1)](/fdservlet/1.md)
