<?xml version="1.0" encoding="UTF-8"?>

<!--
    iDARuleSet.xml extends defaultRuleSet and adds additional
    support for Delegated Administrator.
-->

<!DOCTYPE RuleSet SYSTEM "jar://rewriter.jar/resources/RuleSet.dtd">

<RuleSet type="GROUPED" id="ida_ruleset">

    <!-- Rules for Rewriting HTML Source -->
    <HTMLRules>

       <!-- Rules for Rewriting Applet Parameter Values List -->

            <!-- The following  rules apply to NetMail -->

            <Applet source="*/portal/NetMailServlet" code="NetMail.class"
              param="servletURL" />

            <Applet source="*/portal/NetMailServlet" code="NetMail.class"
              param="exitURL" />

            <Applet source="*/portal/NetMailServlet" code="NetMail.class"
              param="resourcesURL" />

            <Applet source="*/portal/NetMailServlet" code="NetMail.class"
              param="helpURL" />

            <Applet source="*/portal/NetMailServlet" code="NetMail"
              param="servletURL" />

            <!-- End-of-NetMail Applet rules -->

            <!-- Rules for NetMail Local Installer -->

            <Applet source="*/portal/NetMailServlet"
              code="Installer.class" param="cabbase" />
            <Applet source="*/portal/NetMailServlet"
              code="Installer.class" param="helpfilesURL" />

            <!-- End-of-NetMail-Local-Installer rules -->

            <!-- The following  rules apply to NetFile -->

            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="cabbase" />
            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="uploadURL" />
            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="NetFileURL" />
            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="InitURL" />
            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="exitURL" />
            <Applet source="*/portal/NetFileApplet" code="rp.class"
              param="OpenFileURL" />

            <!-- End-of-NetFile Applet rules -->

            <!-- The following  rules apply to NetFile Java 2 -->

            <Applet source="*/portal/NetFileApplet"
              code="NetFileApplet.class" param="UploadURL" />
            <Applet source="*/portal/NetFileApplet"
              code="NetFileApplet.class" param="NetFileURL" />
            <Applet source="*/portal/NetFileApplet"
              code="NetFileApplet.class" param="OpenFileURL" />
	    <Applet source="*/portal/NetFileApplet"
	      code="NetFileApplet.class" param="exitURL" />

            <!-- End-of-NetFile Applet rules Java 2 -->

            <!-- The following rewriting rules apply to the NetLet -->

            <Applet source="*/portal/NetletConfig" code="SServer.class"
              param="configURL" />
            <Applet source="*/portal/NetletConfig" code="SServer.class"
              param="resourcesURL" />

            <!-- End-of-NetLet rules -->

        <!-- Rules for Rewriting HTML Attributes -->

	    <Attribute name="href" />
	    <Attribute name="src" />
            <Attribute name="action" />
	    <Attribute name="background" />
	    <Attribute name="codebase" />
	    <Attribute name="style" />
	    <Attribute name="content" tag="meta" />
	    <Attribute name="pluginspage" tag="embed" />
	    <Attribute name="lowsrc" />
	    <Attribute name="url" />
	    <Attribute name="imagePath" />
	    <Attribute name="viewClass" />
	    <Attribute name="emptyURL" />
	    <Attribute name="draftsURL" />
	    <Attribute name="folderURL" />
	    <Attribute name="prevMonthImage" />
	    <Attribute name="nextMonthImage" />

        <!-- Rules for HTML Attributes containing Java Script -->

	    <JSToken>on*</JSToken>

    </HTMLRules>

    <!-- Rules for Rewriting JavaScript Source -->
    <JSRules>

           <!-- iDA Rules -->
           <Variable type="URL"> imageloc </Variable>
           <Variable type="EXPRESSION">  document.images*.src </Variable>
           <Variable type="EXPRESSION"> hRefStr </Variable>
           <Variable type="DHTML"> mailFilterDispTab </Variable>
           <!-- /iDA Rules -->

	    <Variable type="EXPRESSION"> *location </Variable>
	    <Variable type="EXPRESSION"> *location.href </Variable>
	    <Variable type="EXPRESSION"> *action</Variable>
	    <Variable type="EXPRESSION"> *.src</Variable>
	    <Variable type="EXPRESSION"> *.lowsrc</Variable>

	    <Variable type="SYSTEM"> *location.pathname </Variable>

        <!-- Rules for Rewriting JavaScript Function Parameters -->
	    <Function type="URL" name="Console_goToURL" paramPatterns=",y"/>

	    <!-- MS Specific ActiveX functions -->
	    <Function type="EXPRESSION" name="*HTTP.open" paramPatterns=",y,"/>
	    <Function type="EXPRESSION" name="*XMLhttp*.open" paramPatterns=",y,"/>
	    <Function type="EXPRESSION" name="*XSL.load" paramPatterns="y"/>
	    <Function type="EXPRESSION" name="*.addBehavior" paramPatterns="y"/>
	    <Function type="EXPRESSION" name="*.addHierarchy" paramPatterns="y,,"/>

	    <!-- window.open -->
	    <Function type="EXPRESSION" name="*open" paramPatterns="y"/>
	    <Function type="EXPRESSION" name="*location.replace" paramPatterns="y"/>

	    <!-- MS Specific javascript functions -->
	    <Function type="EXPRESSION" name="*navigate" paramPatterns="y"/>
	    <Function type="EXPRESSION" name="*showModel*Dialog" paramPatterns="y,,"/>

	    <Function type="DHTML" name="document.write" paramPatterns="y"/>
	    <Function type="DHTML" name="document.writeln" paramPatterns="y"/>

    </JSRules>


    <!-- Rules for Rewriting XML Source -->
    <XMLRules>

        <!-- Rules for Rewriting Attributes -->

            <Attribute name="xmlns"/>
            <Attribute name="helpURL"/>
            <Attribute name="loginHelpURL"/>
            <Attribute name="href" tag="a"/>

        <!-- Rules for Rewriting TagTexts -->

            <TagText tag="baseroot" />
            <TagText tag="prop2" />
            <TagText tag="prop1" />
            <TagText tag="img" />
            <TagText tag="xsl:attribute" attributePatterns="name=src" />

    </XMLRules>

</RuleSet>
