Cisco Cisco Collaboration Server Dynamic Content Adapter
DCA 2.01 Administration and Configuration Guide
About the Rule Element 114
Attribute Description
Required? Example
sendtoclient
Specifies whether the Rule
should be available for use
in client-side parsing.
No <RULE
name="myrule"
sendtoclient="FALSE">
Rule Sub-Elements
You can include the following sub-elements within a rule:
Element Description
Example
DESCRIPTION Internal text used for the Rule object's
description.
! Primarily for administration or debugging.
! Maximum of 1 per rule.
<DESCRIPTION>
A brief description of the rule.
</DESCRIPTION>
A brief description of the rule.
</DESCRIPTION>
ACCEPT
Perl5 regular expression used to match text to
be acted upon (e.g., a link to be reformatted)
be acted upon (e.g., a link to be reformatted)
in the parsed document.
! Enclose in a CDATA tag to prevent it from
being parsed as XML.
! Create subgroups as desired.
<ACCEPT name="matchHREFs"
subgroups="1,3">
subgroups="1,3">
<![CDATA[<A\s([^><]*?)HREF\s*=\s*'\s*([
^']*?)\s*'([^><]*?)>]]>
</ACCEPT>
</ACCEPT>
SCRIPT
Defines a script used by the Rule. Once
loaded, the script is compiled when the
loaded, the script is compiled when the
RuleEngine initializes.
! JavaScript is the only supported script
language.
! Enclose in a CDATA tag to prevent it from
being parsed as XML.
! Maximum of 1 script per rule Script event.
<SCRIPT_ONRENDER
language="javascript">
language="javascript">
<![CDATA[<HOSTOBJECT
class="com.cisco.proxy.rules.JS
TagURL" />
class="com.cisco.proxy.rules.JS
TagURL" />
var groupNum = 2;
var newURL = new
TagURL(match.
getGroup(groupNum),
TagURL(match.
getGroup(groupNum),
data.getTargetURL());
var newStr =
match.setGroupJS(groupNum,
match.setGroupJS(groupNum,
newURL.buildCompleteLink(data))
;]]>
;]]>
</SCRIPT_ONRENDER>
Rule Script Events
You can use these Script events within a rule:
Script Event
Description
Example