Defines an HTTP parameter. There are also element forms for some attribute values.
You can use the target attribute to preserve the origin of a parameter, which will by default be merged with other parameter values in a request according to the method used. A value of 'default' puts a parameter in the query string if the method is GET, and in the body if the method is POST. A value of 'query' explicitly adds it to the query string, and 'body' adds it to the body, regardless of method.
It is an error to specify 'body' on the target attribute inside the webd:get element.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
from | Name of parameter to be copied from. | xs:string | none | optional | |
name | Name, or new name, of the parameter. | xs:string | none | optional | |
target | The target of the parameter. | xs:string | default | body, default, query | optional |
value | Value of the parameter. | xs:string | none | optional |
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:pipeline="http://www.volantis.com/xmlns/marlin-pipeline"
xmlns:webd="http://www.volantis.com/xmlns/marlin-web-driver">
<head>
<title>DCI elements</title>
</head>
<body>
<div>
<pipeline:transform href="test.xsl">
<webd:get url="http://weather.yahooapis.com/forecastrss">
<webd:parameters>
<webd:parameter name="p" value="USWA0395"/>
<webd:parameter name="u" value="c"/>
</webd:parameters>
</webd:get>
</pipeline:transform>
</div>
</body>
</html>
The test.xsl transform must have the following form.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<xsl:output method="xml"/>
<xsl:template match="/">
<div xmlns="http://www.w3.org/2002/06/xhtml2">
<h3>
<xsl:value-of select="/rss/channel/item/title"/>
</h3>
<p>Current Conditions: <xsl:value-of select="/rss/channel/item/yweather:condition/@text"/>,
<xsl:value-of select="/rss/channel/item/yweather:condition/@temp"/>
<xsl:value-of select="/rss/channel/yweather:units/@temperature"/>.</p>
</div>
</xsl:template>
</xsl:stylesheet>