Class SchemaReducer

  extended by dk.brics.relaxng.converter.SchemaReducer

public class SchemaReducer
extends Object

Reducer for Restricted RELAX NG schemas.

This removes attribute/element patterns with empty name classes, empty patterns in group/interleave, notAllowed patterns (except the start pattern and defined patterns), and data patterns with empty languages. Also, it simplifies choice/group/interleave patterns with only one child and converts patterns that only have infinite unfoldings to notAllowed.

Constructor Summary
SchemaReducer(NameClass2Automaton ncconv, Data2Automaton dataconv)
          Constructs a new reducer.
Method Summary
 void reduce(Grammar g)
          Reduces the given grammar.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SchemaReducer(NameClass2Automaton ncconv,
                     Data2Automaton dataconv)
Constructs a new reducer.

ncconv - name class converter, if null then skip name class checks
dataconv - data pattern converter, if null then skip data pattern check
Method Detail


public void reduce(Grammar g)
Reduces the given grammar.

g - grammar

Copyright © 2005-2010 Anders Møller.