Package eu.bandm.tools.xslt.base
Class PathMap
java.lang.Object
eu.bandm.tools.dtm.DTM.MATCH_ONLY_00
eu.bandm.tools.dtm.DTM.SinglePathVisitor
eu.bandm.tools.xslt.base.PathMap
Encoding of the target language parse automaton as states and relations.
Required to work in deterministic and non-deterministic mode for
Fragmented Validation of XSLT code.
Collects all possible paths through content models for one given dtd.
The algorithm is a variant of the tpath algorithm described in the
"absynt" paper.
Here all content model positions are encoded as integers.
We need three relations:
For uniform treatment, the toplevel document and all pc data contents are represented by one pseudo element each.
- between parsing positions and the element/pcdata/attributes which must be consumed to reach them,
- between parsing positions and the content model they belong to (currently diagnosis only!),
- among parsing positions, representing legal transitions.
For uniform treatment, the toplevel document and all pc data contents are represented by one pseudo element each.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
Rewriter which gives object identity to element references in content models.(package private) static class
Derived from DTM.Singleton, for imposing object identity. -
Field Summary
Modifier and TypeFieldDescriptionAll accepting states.All states.protected Set<DTM.Element>
protected Multimap<Integer,
DTM.Element> content model position to the element it is part of its content model.protected static final int
(package private) DTM.Element
protected DTM.Dtd
static final DTM.Element
adjacency relation between content model positions.reflexive and transitive closure(package private) final Map<DTM.Singleton,
Integer> (package private) int
protected Multimap<Integer,
DTM.Element> content model position to the element it refers to.protected Map<DTM.Element,
Integer> zero-th content model position of an elementstatic final PathMap
Fields inherited from class eu.bandm.tools.dtm.DTM.MATCH_ONLY_00
_visitor_debug_stream, partial
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
action
(DTM.Choice choice) void
action
(DTM.Element element) void
void
void
action
(DTM.Sequence seq) void
action
(DTM.Singleton sing) void
dump
(PrintStream p) protected void
Construct all relations which represent the parsing automaton.(package private) void
Methods inherited from class eu.bandm.tools.dtm.DTM.SinglePathVisitor
action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, action, follow_alts, follow_attrs, follow_elems, follow_elems, follow_elems, follow_instructions
Methods inherited from class eu.bandm.tools.dtm.DTM.MATCH_ONLY_00
action, action, action, compile, followAll_alts, followAll_attrs, followAll_elems, followAll_elems, followAll_elems, followAll_instructions, foreignObject, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, match, nomatch
-
Field Details
-
dtd
-
refersTo
content model position to the element it refers to. -
belongsTo
content model position to the element it is part of its content model. -
startPos
zero-th content model position of an element -
goesTo
adjacency relation between content model positions. -
goesTo_transRefl
reflexive and transitive closure -
accepting
All accepting states. -
allStates
All states. -
anyContents
-
code_min_cp
protected static final int code_min_cp- See Also:
-
el_PCDATA
-
nextCode
int nextCode -
last
-
currentElement
DTM.Element currentElement -
textOnly
-
grammar2code
-
-
Constructor Details
-
PathMap
public PathMap()
-
-
Method Details
-
init
Construct all relations which represent the parsing automaton. Create a dedicated node for the document, using the "root" parameter. FIXME NEEDED !?!?
Assume "new MakeDifferent().rewrite(origDtd)" or. sim. already done! -
dump
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
processModifier
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-
action
- Overrides:
action
in classDTM.SinglePathVisitor
-