Copyright © 2010 Caringo, Inc.All rights reserved 9Version 2.2December 2010clause. In the example above, where there are two publish clauses, all content streams can bequeued for remote replication once for each publish. In addition, when there are two select clausesin a given publish clause, the content metadata is evaluated against each select clause’s filterset. The select clauses are evaluated in order from top to bottom. When the rules engine findsa select whose filter clauses all evaluate to true, the content stream is placed in the appropriatequeue, (i.e. PrimaryDR or SecondaryDR), and awaits remote replication. Once the evaluation of thatpublish clause is complete, the rules engine begins evaluation of the next publish clause. When allpublish clauses have been evaluated for a given content stream, then the Filter Rules Engine beginsevaluation for the next content stream.3.1.2.2. RulesThe full syntax for the filter rules of a Publisher is presented in simplified RELAX-NG CompactSyntax.start = RuleSetRuleSet = element rule-set {Publish+}Publish = element publish {Select+}Select = element select {(Filter|Exists|NotExists)+,attribute name { text }}Filter = element filter {HeaderAttr,# filter expression, using olderThan(), matches() etc.text}Exists = element exists {HeaderAttr}NotExists = element not-exists {HeaderAttr}HeaderAttr = attribute header { text }Exists and NotExists are tests to check if the header is present or not. An empty header will matchan exists query.Filter expressions are built using a small set of functions. The set of functions available to a filterare:• matches(regexstr) or contains(regexstr) - matches any part of the header value to a given regularexpression