dsp:setxml lets you specify whether all tag attributes for a given page should be generated into an XML or HTML-style format. By default, tags use the XML formatting, which looks like this:

<sometag selected="selected">

The HTML version omits the attribute value and assumes true unless otherwise specified:

<sometag selected>

Another distinction between HTML and XML involves closing tags. XML tags require a closing tag either in the form of:

<sometag></sometag>

or

<sometag />

HTML does not require a closing tag.

Although most browsers read both formats, some old browsers might have trouble interpreting the XML version. For such browsers, you can set this tag so the page compiler outputs the HTML version of a page.

Based on your tag placement, you might designate parts of a page to use HTML formatting and other parts to use XML. Another way to set the output format for the entire page is by using the dsp:page tag xml attribute. See dsp:page for information.

Attributes

Tagformatting:value(Required)

The value attribute determines whether the rest of the remaining page is formatted in XML-style tags (true) or HTML-style tags (false).

Delimiter:useXmlParamDelimiter

The useXmlParamDelimiter attribute specifies the delimiter that is used by DynamoHTTPServletRequest.addQueryParam to separate query parameters that exist in the page after this tag. The options are as follows:

When no delimiter value is specified by a dsp:setxml or dsp:page tag in this page or a parent page, the ATG platform uses the delimiter associated with the page’s MIME type.

Example

<dsp:tomap bean="BrowserAttributes" var="browser"/>
<c:if value="${browser.Mosiac}">
    <dsp:setxml value="false"/>
</c:if>

This example checks to see if the browser that made the request is a Mosaic browser. Because Mosaic is an old browser, it might have trouble handling XML-styled attributes so when a Mosaic browser makes a request, the dsp:setxml tag sets the attribute style to HTML.

 
loading table of contents...