Export (0) Print
Expand All

os:parameter Element

Specifies the mapping between document properties and service parameters.


    name = "sName"
    type = "sType"
    value = "sValue"/>


Required. The URL or form parameter name, as required by the remote service.
Optional. The format of the {selection} variable.
textDefault. The value is passed as plain text.
htmlThe value is passed as htmlText.
Required. The value of the name parameter. This string can contain text and/or variable names. See Remarks.

Element Information

Parent elements os:execute, os:preview
Child elements None
Minimum availability Internet Explorer 8
Minimum operating systems Windows XP SP2


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 note Security Alert  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 note Security Alert  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.


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" /> 

See Also


Community Additions

© 2015 Microsoft