Skip to content
Deane Barker edited this page Mar 20, 2019 · 4 revisions

The only configuration is the setting of variables in an application config file. These variables are set globally, and available to all pipelines.

<configuration>
  <configSections>
    <section name="denina" type="DeninaSharp.Core.Configuration.PipelineConfigSection, DeninaSharp" />
  <configSections>
  <denina>
    <variables>
      <add key="Sql.AllowedConnectionStrings" value="[comma-delimited list of allowed connection strings]" />
      <add key="File.BaseIncludePath" value="[path to include directory, relative to AppDomain root]" />
      <add key="Xml.Transform.XsltExtensionClass" value="[TODO: explain this]" />
      <add key="Http.AllowedDomains" value="[comma-delimited list of allow domains, or "*" for all]" />
    </variables>
  </denina>
<configuration>

The variables above are those set by the default Nuget package installation. These variables are required by filters in the core library.

  • Sql.AllowedConnectionStrings: Required by multiple SQL filters, this authorizes specific connection strings for use in Denina scripts.
  • File.BaseIncludePath: Required by the ReadFile filter, this is the base directory from while the file path will search from. This allows the "sandboxing" of file includes to a specific directory branch.
  • Xml.Transform.XsltExtensionClass: Required by the Xml.Transform filter, this specifies a base class to be passed into XSLT to expose embedded C# methods to XSL.
  • Http.AllowedDomains: Required by multiple HTTP filters, this specifies domains for which outgoing HTTP calls are authorized. "*" authorizes all domains.

Any variables can be set in configuration. For example, it would be helpful to specify API keys in a central location.

<add key="WebServiceApiKey" value="0000-0000-0000-000"/>

Thus, editors can use this key like this:

SetVar -var:url -value:http://webservice.com
Url.AddQuerystringArg -key:access_token -value:$WebServiceApiKey
Http.Get

Clone this wiki locally