Cisco Cisco Collaboration Server Dynamic Content Adapter

Seite von 223
DCA 2.01 Administration and Configuration Guide 
About the Accept Element   117 
When writing expressions for an Accept element: 
You specify an Accept statement as a Perl5 regular expression. Expressions must be 
syntactically correct, or the rule will not be included in parser. One online resource 
for Perl5 syntax is at:  http://www.mit.edu:8001/perl/perlre.html. 
There is no limit on the number of Accept elements you can include in a single rule. 
Pieces of document text matched through different Accept statements can be 
modified by a single script in the rule. 
Expressions must be syntactically correct or the rule will not be included in the 
parser. 
Wrap expressions in CDATA tags to avoid XML parsing errors. For example: 
<![CDATA[<my_expression>]]>
Using Subgroups in Accept Statements 
Your can include subgroups within the regular expressions in your Accept 
statements. These subgroups, numbered right to left, can be reparsed, allowing the 
same text to be recursively parsed multiple times.  
For example, consider FORMs. Each FORM includes an open and close tag and an 
action that consists of a link. This link must be parsed to point to the DCA. At the 
same time, within a form there may be additional HREFs different in structure than 
the FORM action, but which also require parsing. Recursive parsing could be used in 
this instance to search for and modify a FORM action link on the initial pass, and 
then additional links within the form tag on subsequent passes. 
When creating subgroups: 
•  Within your Accept statement, enclose subgroups in parentheses, as shown 
earlier in the Accept example. 
•  In the ACCEPT tag, include a subgroup attribute that specifies the number to 
assign to the first subgroup, and the total number of subgroups in the 
expression. For example: <ACCEPT name="myaccept" subgroups="1,3">. 
See Also 
For related information, see: 
About the Parsing Engine 
About the Rule Element 
About Parser Scripts