com.sun.msv.writer
Interface GrammarWriter

All Known Implementing Classes:
RELAXNGWriter, TREXWriter

public interface GrammarWriter

Converter from AGM to the XML representation.

Author:
Kohsuke KAWAGUCHI

Method Summary
 void setDocumentHandler(DocumentHandler handler)
          set DocumentHandler.
 void write(Grammar grammar)
          converts this grammar to the XML representation.
 

Method Detail

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
set DocumentHandler. This handler will receive the result of conversion.

write

public void write(Grammar grammar)
           throws UnsupportedOperationException,
                  SAXException
converts this grammar to the XML representation.
Throws:
UnsupportedOperationException - if this grammar cannot be serialized. this exception can be thrown on the half way of the conversion.
SAXException - DocumentHandler may throw a SAXException.