auda.xrd Usage Example

Suppose you want to use the DUA_GDC output map for Internet Explorer browsers and DUA_XXX for all other user agents. To achieve this, you have to configure your application to support both Output Maps.

In your GAS configuration file (as.xcf), you would add a rule, such as UseAllOutputDriver:

<APPLICATION Id="test" Parent="defaultwa">
  <EXECUTION>
    <PATH>$(res.path.fgldir.demo)</PATH>
    <MODULE>demo.42r</MODULE>
  </EXECUTION>
  <OUTPUT Rule="UseAllOutputDriver">
    <MAP Id="DUA_XXX" Allowed="TRUE">
      <RENDERING Using="cpn.rendering.wa"/>
      <THEME Using="cpn.theme.default.xxx"/>
    </MAP>
    <MAP Id="DUA_GDC" Allowed="TRUE">
      <RENDERING Using="cpn.rendering.wa"/>
      <THEME Using="cpn.theme.default.gdc"/>
    </MAP>
  </OUTPUT>
</APPLICATION>

In adua.xrd, you would have the following:

<RULE Id="UseAllOutputDriver">
  <TABLE Id="1" Key="User-Agent">
    <ROW>
      <IN>MSIE</IN>
      <ACTION Type="RESULT">DUA_GDC</ACTION>
    </ROW>
    <ROW>
      <ACTION Type="RESULT">DUA_XXX</ACTION>
    </ROW>
  </TABLE>
</RULE>

With this example, if the User-Agent value contains MSIE, GDCAX will be used; otherwise the mapping that corresponds to the DUA_XXX will be used.