Class MinimalDTDReader

    • Field Detail

      • mIsExternal

        final boolean mIsExternal
        True, when reading external subset, false when reading internal subset.
    • Constructor Detail

      • MinimalDTDReader

        private MinimalDTDReader​(WstxInputSource input,
                                 ReaderConfig cfg)
        Constructor used for reading/skipping internal subset.
      • MinimalDTDReader

        protected MinimalDTDReader​(WstxInputSource input,
                                   ReaderConfig cfg,
                                   boolean isExt)
        Common initialization part of int/ext subset constructors.
    • Method Detail

      • skipInternalSubset

        public static void skipInternalSubset​(WstxInputData srcData,
                                              WstxInputSource input,
                                              ReaderConfig cfg)
                                       throws javax.xml.stream.XMLStreamException
        Method that just skims through structure of internal subset, but without doing any sort of validation, or parsing of contents. Method may still throw an exception, if skipping causes EOF or there's an I/O problem.
        Parameters:
        srcData - Link back to the input buffer shared with the owning stream reader.
        Throws:
        javax.xml.stream.XMLStreamException
      • getLocation

        public final javax.xml.stream.Location getLocation()
        What DTD reader returns doesn't really matter, so let's just return perceived start location (different from what stream readers actually do)
        Specified by:
        getLocation in interface InputProblemReporter
        Specified by:
        getLocation in class StreamScanner
      • findEntity

        protected EntityDecl findEntity​(java.lang.String id,
                                        java.lang.Object arg)
        Description copied from class: StreamScanner
        Abstract method for sub-classes to implement, for finding a declared general or parsed entity.
        Specified by:
        findEntity in class StreamScanner
        Parameters:
        id - Identifier of the entity to find
        arg - Optional argument passed from caller; needed by DTD reader.
      • handleUndeclaredEntity

        protected void handleUndeclaredEntity​(java.lang.String id)
                                       throws javax.xml.stream.XMLStreamException
        This is a VC, not WFC, nothing to do when skipping through DTD in non-supporting mode.
        Specified by:
        handleUndeclaredEntity in class StreamScanner
        Throws:
        javax.xml.stream.XMLStreamException
      • handleIncompleteEntityProblem

        protected void handleIncompleteEntityProblem​(WstxInputSource closing)
                                              throws javax.xml.stream.XMLStreamException
        Since improper entity/PE nesting is VC, not WFC, let's not react to this failure at all when only skipping the DTD subset.
        Specified by:
        handleIncompleteEntityProblem in class StreamScanner
        Throws:
        javax.xml.stream.XMLStreamException
      • handleExpandedSurrogate

        protected char handleExpandedSurrogate​(char first,
                                               char second)
      • findEntity

        public EntityDecl findEntity​(java.lang.String entName)
        Method that may need to be called by attribute default value validation code, during parsing....

        03-Dec-2004, TSa: This is not particularly elegant: should be able to pass the information some other way. But for now it works and is necessary.

      • skipInternalSubset

        protected void skipInternalSubset()
                                   throws javax.xml.stream.XMLStreamException
        Method that will skip through internal DTD subset, without doing any parsing, except for trying to match end of subset properly.
        Throws:
        javax.xml.stream.XMLStreamException
      • dtdNextFromCurr

        protected char dtdNextFromCurr()
                                throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • dtdNextChar

        protected char dtdNextChar()
                            throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • getNextSkippingPEs

        protected char getNextSkippingPEs()
                                   throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipPE

        private void skipPE()
                     throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipComment

        protected void skipComment()
                            throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipCommentContent

        protected void skipCommentContent()
                                   throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipPI

        protected void skipPI()
                       throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipDeclaration

        private void skipDeclaration​(char c)
                              throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipLiteral

        private void skipLiteral​(char quoteChar)
                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • skipDTDName

        private void skipDTDName()
                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • getErrorMsg

        protected java.lang.String getErrorMsg()
      • throwIllegalCall

        protected void throwIllegalCall()
                                 throws java.lang.Error
        Throws:
        java.lang.Error