selectorSequence);
}
// Create a rule using a type selector for the common
// properties.
RuleBuilder ruleBuilder =
ruleBuilderFactory.createRuleBuilder();
SimpleSelectorSequenceBuilder sequenceBuilder =
ruleBuilderFactory.createSequenceBuilder();
if (selectorSequence.getType() != null) {
sequenceBuilder.setTypeSelector(
selectorSequence.getType());
}
sequenceBuilder.addPseudoSelectors(
selectorSequence.getPath());
ruleBuilder.addSequence(sequenceBuilder);
ruleBuilder.setProperties(commonProperties);
Rule rule = ruleBuilder.getRule();
// Add the created rule to the rule set.
styleSheet.addRule(rule);
// Remove the common properties we have created a rule for