Fix issue #13: There should not be a semicolon with empty rules.
Fix issue #16: Handle attribute selector properly.