1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
534 } catch (IOException ioe) {
535 throw ioe;
536 } catch (RuntimeException rte) {
537 throw rte;
538 } catch (Exception e) {
539 panic(e.toString());
540 } finally {
541 mHandCont.endDocument();
542 cleanup();
543 }
544 }
545
546 /**
547 * Reports document type.
548 *
549 * @param name The name of the entity.
550 * @param pubid The public identifier of the entity or <code>null</code>.
551 * @param sysid The system identifier of the entity or <code>null</code>.
552 */
553 protected void docType(String name, String pubid, String sysid) throws SAXException {
554 mHandDtd.notationDecl(name, pubid, sysid);
555 }
556
557 /**
558 * Reports a comment.
559 *
560 * @param text The comment text starting from first charcater.
561 * @param length The number of characters in comment.
562 */
563 protected void comm(char[] text, int length) {
564 }
565
566 /**
567 * Reports a processing instruction.
568 *
569 * @param target The processing instruction target name.
570 * @param body The processing instruction body text.
571 */
572 protected void pi(String target, String body) throws SAXException {
573 mHandCont.processingInstruction(target, body);
574 }
|
1 /*
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
534 } catch (IOException ioe) {
535 throw ioe;
536 } catch (RuntimeException rte) {
537 throw rte;
538 } catch (Exception e) {
539 panic(e.toString());
540 } finally {
541 mHandCont.endDocument();
542 cleanup();
543 }
544 }
545
546 /**
547 * Reports document type.
548 *
549 * @param name The name of the entity.
550 * @param pubid The public identifier of the entity or <code>null</code>.
551 * @param sysid The system identifier of the entity or <code>null</code>.
552 */
553 protected void docType(String name, String pubid, String sysid) throws SAXException {
554 mHandDtd.startDTD(name, pubid, sysid);
555 }
556
557 /**
558 * Reports the start of DTD internal subset.
559 *
560 * @throws SAXException if the receiver throws SAXException
561 */
562 public void startInternalSub () throws SAXException {
563 mHandDtd.startInternalSub();
564 }
565
566 /**
567 * Reports a comment.
568 *
569 * @param text The comment text starting from first charcater.
570 * @param length The number of characters in comment.
571 */
572 protected void comm(char[] text, int length) {
573 }
574
575 /**
576 * Reports a processing instruction.
577 *
578 * @param target The processing instruction target name.
579 * @param body The processing instruction body text.
580 */
581 protected void pi(String target, String body) throws SAXException {
582 mHandCont.processingInstruction(target, body);
583 }
|