Class ResultContext

  • public class ResultContext
    extends java.lang.Object
    Convenience class for accessing all data which depends on the target DTD and is required for xslt parsing and execution. This includes the sax parsing method and the implementing classes, indexed by the NamespaceName of the target's dtd element definitions.
    • Field Detail

      • name_sax_parse_method

        public static final java.lang.String name_sax_parse_method
        See Also:
        Constant Field Values
      • isTextOnly

        final boolean isTextOnly
      • tdom_package_name

        final java.lang.String tdom_package_name
      • semiparseMethods

        final java.util.Map<NamespaceName,​java.lang.reflect.Method> semiparseMethods
      • sax_parse_methods

        final java.util.Map<NamespaceName,​java.lang.reflect.Method> sax_parse_methods
      • class_base

        final java.lang.Class<?> class_base
      • class_dumper

        final java.lang.Class<?> class_dumper
      • class_extension

        final java.lang.Class<?> class_extension
      • class_visitor

        final java.lang.Class<?> class_visitor
      • allAttributeNames

        final java.util.Set<NamespaceName> allAttributeNames
    • Method Detail

      • copySaxMethods

        static void copySaxMethods​(java.util.Map<NamespaceName,​TypedDTD.AbstractElementInfo> infos,
                                   java.lang.Class<?> extension,
                                   java.util.Map<NamespaceName,​java.lang.Class<? extends TypedElement>> classes,
                                   java.util.Map<NamespaceName,​java.lang.reflect.Method> methods)
        This extraction must also be done for the sax parsing methods for "xslt" itself, but only once. Therefore it is made package-visible here.
        infos - input parameter: element wise info as provided by TypedDTD.
        extension - input param: the extension class, required for method look-up
        classes - OUTPUT param: map from NamespaceName to immplementing Class.
        methods - OUTPUT param: map from NamespaceName to sax parsing Method.
      • newInstance

        public static ResultContext newInstance​(java.lang.String tdom_package_name,
                                                MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
        Extracts all the data required for parsing and stores them into public read-only fields. Esp. initializes pathMap, the relations for Fragmented Validation. Returns null in case of error, so that calling level can continue batch processing with alternatives.
      • dumpToContentHandler

        public void dumpToContentHandler​(TypedSubstantial corpus,
                                         org.xml.sax.ContentHandler ch)
        Calls the Dump-method of the target tdom implementation via reflection and pipes all SAX events into the ContentHandler.