| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Whitespace.
Auxillary class for encapsulating a single strip/preserve rule |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private String | |
| private int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | compilePredicate(List<Whitespace.
Compiles the predicate method |
| public static void | |
| public static void | |
| private static Whitespace. | findContradictingRule(List<Whitespace.
Scans through the rules vector and looks for a rule of higher priority that contradicts the current rule. |
| public List | getRules()
De-tokenize the elements listed in the 'elements' attribute and instanciate a set of strip/preserve rules. |
| public void | parseContents(Parser parser)
Overrides com. Parse the attributes of the xsl:strip/preserve-space element. |
| private static int | |
| private static int | prioritizeRules(List<Whitespace.
Orders a set or rules by priority, removes redundant rules and rules that are shadowed by stronger, contradicting rules. |
| private static void | quicksort(List<Whitespace.
Sorts a range of rules with regard to PRIORITY only |
| public void | translate(ClassGenerator classGen, MethodGenerator methodGen)
Overrides com. This method should not produce any code |
| public static int | translateRules(List<Whitespace.
Takes a vector of WhitespaceRule objects and generates a predicate method. |
| public Type | typeCheck(SymbolTable stable)
Overrides com. Type-check contents/attributes - nothing to do... |
| _action | back to summary |
|---|---|
| private int _action | |
| _elementList | back to summary |
|---|---|
| private String _elementList | |
| _importPrecedence | back to summary |
|---|---|
| private int _importPrecedence | |
| PRESERVE_SPACE | back to summary |
|---|---|
| public static final int PRESERVE_SPACE | |
| RULE_ALL | back to summary |
|---|---|
| public static final int RULE_ALL | |
| RULE_ELEMENT | back to summary |
|---|---|
| public static final int RULE_ELEMENT | |
| RULE_NAMESPACE | back to summary |
|---|---|
| public static final int RULE_NAMESPACE | |
| RULE_NONE | back to summary |
|---|---|
| public static final int RULE_NONE | |
| STRIP_SPACE | back to summary |
|---|---|
| public static final int STRIP_SPACE Hides com. | |
| USE_PREDICATE | back to summary |
|---|---|
| public static final int USE_PREDICATE | |
| Whitespace | back to summary |
|---|---|
| pack-priv Whitespace() | |
| compileDefault | back to summary |
|---|---|
| private static void compileDefault(int defaultAction, ClassGenerator classGen) Compiles the predicate method | |
| compilePredicate | back to summary |
|---|---|
| private static void compilePredicate(List<Whitespace. Compiles the predicate method | |
| compilePreserveSpace | back to summary |
|---|---|
| public static void compilePreserveSpace(BranchHandle[] preserve, int pCount, InstructionList il) | |
| compileStripSpace | back to summary |
|---|---|
| public static void compileStripSpace(BranchHandle[] strip, int sCount, InstructionList il) | |
| findContradictingRule | back to summary |
|---|---|
| private static Whitespace. Scans through the rules vector and looks for a rule of higher priority that contradicts the current rule.
| |
| getRules | back to summary |
|---|---|
| public List De-tokenize the elements listed in the 'elements' attribute and instanciate a set of strip/preserve rules. | |
| parseContents | back to summary |
|---|---|
| public void parseContents(Parser parser) Overrides com. Parse the attributes of the xsl:strip/preserve-space element. The element should have not contents (ignored if any). | |
| partition | back to summary |
|---|---|
| private static int partition(List<Whitespace. Used with quicksort method above | |
| prioritizeRules | back to summary |
|---|---|
| private static int prioritizeRules(List<Whitespace. Orders a set or rules by priority, removes redundant rules and rules that are shadowed by stronger, contradicting rules. | |
| quicksort | back to summary |
|---|---|
| private static void quicksort(List<Whitespace. Sorts a range of rules with regard to PRIORITY only | |
| translate | back to summary |
|---|---|
| public void translate(ClassGenerator classGen, MethodGenerator methodGen) Overrides com. This method should not produce any code | |
| translateRules | back to summary |
|---|---|
| public static int translateRules(List<Whitespace. Takes a vector of WhitespaceRule objects and generates a predicate method. This method returns the translets default action for handling whitespace text-nodes: - USE_PREDICATE (run the method generated by this method) - STRIP_SPACE (always strip whitespace text-nodes) - PRESERVE_SPACE (always preserve whitespace text-nodes) | |
| typeCheck | back to summary |
|---|---|
| public Type typeCheck(SymbolTable stable) throws TypeCheckError Overrides com. Type-check contents/attributes - nothing to do... | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private String | |
| private String | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public String | |
| public String | |
| public int | |
| public int |
| _action | back to summary |
|---|---|
| private final int _action | |
| _element | back to summary |
|---|---|
| private String _element | |
| _namespace | back to summary |
|---|---|
| private String _namespace | |
| _priority | back to summary |
|---|---|
| private int _priority | |
| _type | back to summary |
|---|---|
| private int _type | |
| WhitespaceRule | back to summary |
|---|---|
| public WhitespaceRule(int action, String element, int precedence) Strip/preserve rule constructor | |
| compareTo | back to summary |
|---|---|
| public int compareTo(Whitespace. For sorting rules depending on priority | |
| getAction | back to summary |
|---|---|
| public int getAction() | |
| getElement | back to summary |
|---|---|
| public String getElement() | |
| getNamespace | back to summary |
|---|---|
| public String getNamespace() | |
| getPriority | back to summary |
|---|---|
| public int getPriority() | |
| getStrength | back to summary |
|---|---|
| public int getStrength() | |