<dsp:setxml value="{true|false}"[
useXmlParamDelimiter="{true|false}"]
/>
Attributes
value
Determines whether to format the remaining page in XML-style tags (true) or HTML-style tags (false).
useXmlParamDelimiter
Specifies the delimiter used by DynamoHTTPServletRequest.addQueryParam
to separate query parameters that exist in the page after this tag:
true: XML delimiter
&
false: HTML delimiter
&
If no delimiter value is specified by a dsp:setxml
or dsp:page
tag in this page or one of its parents, the ATG platform uses the delimiter associated with the page’s MIME type.
Usage Notes
dsp:setxml
lets you specify whether to generate XML or HTML from tag attributes on a given page. By default, tags use the XML formatting:
<sometag selected="selected">
If generated as HTML, the attribute value is omitted and assumes true unless otherwise specified:
<sometag selected>
HTML tags do not require closing tags; XML tags require one of the following formats:
<sometag></sometag>
<sometag />
Based on tag placement, you might designate parts of a page to use HTML formatting and other parts to use XML. You can also set the output format for the entire page with the xml
attribute of dsp:page.
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.