os:parameter element

Specifies the mapping between document properties and service parameters.

Usage

<os:parameter
  name = "sName"
  type = "sType"
  value = "sValue"/>

Attributes

Attribute Type Required Description

name

sName

Yes

The URL or form parameter name, as required by the remote service.

type

sType

No

The format of the {selection} variable.

text

Default. The value is passed as plain text.

html

The value is passed as htmlText.

value

sValue

Yes

The value of the name parameter. This string can contain text and/or variable names. See Remarks.

Child elements

There are no child elements.

Parent elements

Element

os:execute

os:preview

Remarks

The following variable names are defined:

Variable Description
{documentUrl} The href of the document.
{documentTitle} The title of the document, if available.
{documentDomain} Effective second-level domain from the document's URL.
{documentHost} Fully qualified domain from the document's URL.
{selection} Currently selected text.
{link} The href of the selected link.
{linkText} The innerText of the selected link.
{linkRel} The rel of the selected link.
{linkType} The type of the selected link.
{linkDomain} Effective second-level domain from the target URL.
{linkHost} Fully qualified domain from the target URL.

 

Enclose variable names in curly braces {}; for example, {selection}.

Placing a "?" after the variable name indicates that it is optional; for example, {documentTitle?}. If the variable is optional and the value is empty, then the empty string is used as a replacement value. If a variable is not optional and the value is empty, then the entire os:parameter element is discarded when submitting to the service.

Security Warning: To prevent potentially sensitive data from unintentional disclosure, document variables cannot be used when previewing selection or link data. During installation, a privacy warning is displayed if the Accelerator uses document variables.

Newline characters within selected text are passed as encoded URL parameters: %0D%0A.

Security Warning: If you create an Accelerator that uses a {selection} parameter of type "html", then the service must be explicitly set up to correctly sanitize and handle arbitrary HTML input. Web services that allow arbitrary input without filtering or encoding are susceptible to HTML/script injection attacks.

Examples

The following Accelerator snippet uses os:parameter elements to pass values as URL parameters.

<activityAction context="selection">
  <execute method="get" action="http://www.example.com/BlogIt.aspx">
    <parameter name="title" value="{documentTitle?}" /> 
    <parameter name="SourceURL" value="{documentUrl}" /> 
    <parameter name="description" value="{selection}" type="html" /> 
  </execute>
</activityAction> 

Element information

Minimum supported system

Windows XP with SP2
Can be empty Yes

See also

os:preview