org.kohsuke.rngom.ast.util
クラス CheckingSchemaBuilder

java.lang.Object
  拡張org.kohsuke.rngom.parse.host.Base
      拡張org.kohsuke.rngom.parse.host.SchemaBuilderHost
          拡張org.kohsuke.rngom.ast.util.CheckingSchemaBuilder
すべての実装インタフェース:
SchemaBuilder

public class CheckingSchemaBuilder
extends SchemaBuilderHost

Wraps a SchemaBuilder and does all the semantic checks required by the RELAX NG spec.

Usage

Whereas you normally write it as follows:

 YourParsedPattern r = (YourParsedPattern)parseable.parse(sb);
 
write this as follows:
 YourParsedPattern r = (YourParsedPattern)parseable.parse(new CheckingSchemaBuilder(sb,eh));
 

The checking is done by using the rngom.binary package, so if you are using that package for parsing schemas, then there's no need to use this.

作成者:
Kohsuke Kawaguchi (kk@kohsuke.org)

コンストラクタの概要
CheckingSchemaBuilder(SchemaBuilder sb, org.xml.sax.ErrorHandler eh)
           
CheckingSchemaBuilder(SchemaBuilder sb, org.xml.sax.ErrorHandler eh, org.relaxng.datatype.DatatypeLibraryFactory dlf)
           
 
メソッドの概要
 ParsedPattern expandPattern(ParsedPattern p)
          Called after all the parsing is done.
 
クラス org.kohsuke.rngom.parse.host.SchemaBuilderHost から継承したメソッド
annotate, annotateAfter, commentAfter, getNameClassBuilder, makeAnnotations, makeAttribute, makeChoice, makeCommentList, makeDataPatternBuilder, makeElement, makeElementAnnotationBuilder, makeEmpty, makeErrorPattern, makeExternalRef, makeGrammar, makeGroup, makeInterleave, makeList, makeLocation, makeMixed, makeNotAllowed, makeOneOrMore, makeOptional, makeText, makeValue, makeZeroOrMore, usesComments
 
クラス org.kohsuke.rngom.parse.host.Base から継承したメソッド
cast, cast
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CheckingSchemaBuilder

public CheckingSchemaBuilder(SchemaBuilder sb,
                             org.xml.sax.ErrorHandler eh)
パラメータ:
sb - Your SchemaBuilder that parses RELAX NG schemas.
eh - All the errors found will be sent to this handler.

CheckingSchemaBuilder

public CheckingSchemaBuilder(SchemaBuilder sb,
                             org.xml.sax.ErrorHandler eh,
                             org.relaxng.datatype.DatatypeLibraryFactory dlf)
メソッドの詳細

expandPattern

public ParsedPattern expandPattern(ParsedPattern p)
                            throws BuildException,
                                   IllegalSchemaException
インタフェース SchemaBuilder の記述:
Called after all the parsing is done.

This hook typically allows as SchemaBuilder to expand notAllowed (if it's following the simplification as in the spec.)

定義:
インタフェース SchemaBuilder 内の expandPattern
オーバーライド:
クラス SchemaBuilderHost 内の expandPattern
例外:
BuildException
IllegalSchemaException