code.google.com home

org.owasp.html
Class CssSchema

java.lang.Object
  extended by org.owasp.html.CssSchema

public final class CssSchema
extends java.lang.Object

Describes the kinds of tokens a CSS property's value can safely contain.


Field Summary
static CssSchema DEFAULT
          A schema that includes only those properties on the default schema white-list.
 
Method Summary
 java.util.Set<java.lang.String> allowedProperties()
          The set of CSS properties allowed by this schema.
static void main(java.lang.String... argv)
          Dumps key and literal list to stdout for easy examination.
static CssSchema union(CssSchema... cssSchemas)
          A schema that represents the union of the input schemas.
static CssSchema withProperties(java.lang.Iterable<? extends java.lang.String> propertyNames)
          A schema that includes all and only the named properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final CssSchema DEFAULT
A schema that includes only those properties on the default schema white-list.

Method Detail

withProperties

public static CssSchema withProperties(java.lang.Iterable<? extends java.lang.String> propertyNames)
A schema that includes all and only the named properties.

Parameters:
propertyNames - a series of lower-case CSS property names that appear in the built-in CSS definitions. It is an error to mention an unknown property name. This class's main method will dump a list of known property names when run with zero arguments.

union

public static CssSchema union(CssSchema... cssSchemas)
A schema that represents the union of the input schemas.

Returns:
A schema that allows all and only CSS properties that are allowed by at least one of the inputs.

allowedProperties

public java.util.Set<java.lang.String> allowedProperties()
The set of CSS properties allowed by this schema.

Returns:
an immutable set.

main

public static void main(java.lang.String... argv)
Dumps key and literal list to stdout for easy examination.


code.google.com home