Class TdomReader

java.lang.Object
eu.bandm.tools.xantlrtdom.TdomReader

public class TdomReader extends Object
Glueing code for creating a tdom model from some textual representation.
Cf.the user documentation of tdom.

Cf. xslt/base/ResultContext for extracting info from TypedDTD.
  • Constructor Details

    • TdomReader

      public TdomReader()
  • Method Details

    • parseXmlFile

      public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance)
    • parseXmlFile

      public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt @Opt EntityResolver resolver)
    • parseXmlFile

      public static <T extends TypedDocument> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, boolean debug)
    • parseXmlFile

      public static <T extends TypedDocument, E extends TypedExtension> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, @Opt @Opt EntityResolver resolver, Class<E> extClass, E ext)
    • parseXmlFile

      public static <T extends TypedDocument, D extends TypedDTD> T parseXmlFile(InputSource inputSource, Class<T> documentClass, D dtdInstance, EntityResolver resolver, boolean debug)
    • parseXmlFile

      public static <T extends TypedDocument, E extends TypedExtension> T parseXmlFile(InputSource inputSource, Class<T> documentClass, TypedDTD dtdInstance, EntityResolver resolver, Class<E> extClass, E ext, boolean debug)
      Glueing code for creating a tdom model from some textual representation.
      It uses a standard xml-text-file reader, as provided by the Java infrastructure. It does use this in NON-validating mode. Instead, it does whitespace ignoring by an explicit, a posteriori processing step. Thus no DTD-access is required beyond that which is compiled INTO the tdom code and data structures.
      (Thus no "<DOCTYPE" declaration should be necessary. Some particular implementation of "XMLReaderFactory" requires that, if present, it must be syntactically correct. The system part can be the empty string.)
      Parameters:
      inputSource - to parse
      documentClass - the Class object generated by tdom, a sub-class of tdom.runtime.TypedDocument.
      dtdInstance - an instance of the DTD type generated by tdom, i.e. of a sub-class of tdom.runtime.TypedDTD. This class is normally called "DTD.java" in the generated package sources and suplies one instance in its static field "dtd"..
      resolver - the Entity resolver used for resolving "external entity declarations"
      extClass - ?? FIXME
      ext - ?? FIXME
      debug - a flag when set causes printing of all parsed SAX events to System.out.