286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 1999-2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A/*
286N/A * $Id: SerializerTrace.java,v 1.2.4.1 2005/09/15 08:15:24 suresh_emailid Exp $
286N/A */
286N/Apackage com.sun.org.apache.xml.internal.serializer;
286N/A
286N/Aimport org.xml.sax.Attributes;
286N/A
286N/A/**
286N/A * This interface defines a set of integer constants that identify trace event
286N/A * types.
286N/A *
286N/A * @xsl.usage internal
286N/A */
286N/A
286N/Apublic interface SerializerTrace {
286N/A
286N/A /**
286N/A * Event type generated when a document begins.
286N/A *
286N/A */
286N/A public static final int EVENTTYPE_STARTDOCUMENT = 1;
286N/A
286N/A /**
286N/A * Event type generated when a document ends.
286N/A */
286N/A public static final int EVENTTYPE_ENDDOCUMENT = 2;
286N/A
286N/A /**
286N/A * Event type generated when an element begins (after the attributes have been processed but before the children have been added).
286N/A */
286N/A public static final int EVENTTYPE_STARTELEMENT = 3;
286N/A
286N/A /**
286N/A * Event type generated when an element ends, after it's children have been added.
286N/A */
286N/A public static final int EVENTTYPE_ENDELEMENT = 4;
286N/A
286N/A /**
286N/A * Event type generated for character data (CDATA and Ignorable Whitespace have their own events).
286N/A */
286N/A public static final int EVENTTYPE_CHARACTERS = 5;
286N/A
286N/A /**
286N/A * Event type generated for ignorable whitespace (I'm not sure how much this is actually called.
286N/A */
286N/A public static final int EVENTTYPE_IGNORABLEWHITESPACE = 6;
286N/A
286N/A /**
286N/A * Event type generated for processing instructions.
286N/A */
286N/A public static final int EVENTTYPE_PI = 7;
286N/A
286N/A /**
286N/A * Event type generated after a comment has been added.
286N/A */
286N/A public static final int EVENTTYPE_COMMENT = 8;
286N/A
286N/A /**
286N/A * Event type generate after an entity ref is created.
286N/A */
286N/A public static final int EVENTTYPE_ENTITYREF = 9;
286N/A
286N/A /**
286N/A * Event type generated after CDATA is generated.
286N/A */
286N/A public static final int EVENTTYPE_CDATA = 10;
286N/A
286N/A /**
286N/A * Event type generated when characters might be written to an output stream,
286N/A * but these characters never are. They will ultimately be written out via
286N/A * EVENTTYPE_OUTPUT_CHARACTERS. This type is used as attributes are collected.
286N/A * Whenever the attributes change this event type is fired. At the very end
286N/A * however, when the attributes do not change anymore and are going to be
286N/A * ouput to the document the real characters will be written out using the
286N/A * EVENTTYPE_OUTPUT_CHARACTERS.
286N/A */
286N/A public static final int EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS = 11;
286N/A
286N/A /**
286N/A * Event type generated when characters are written to an output stream.
286N/A */
286N/A public static final int EVENTTYPE_OUTPUT_CHARACTERS = 12;
286N/A
286N/A
286N/A /**
286N/A * Tell if trace listeners are present.
286N/A *
286N/A * @return True if there are trace listeners
286N/A */
286N/A public boolean hasTraceListeners();
286N/A
286N/A /**
286N/A * Fire startDocument, endDocument events.
286N/A *
286N/A * @param eventType One of the EVENTTYPE_XXX constants.
286N/A */
286N/A public void fireGenerateEvent(int eventType);
286N/A
286N/A /**
286N/A * Fire startElement, endElement events.
286N/A *
286N/A * @param eventType One of the EVENTTYPE_XXX constants.
286N/A * @param name The name of the element.
286N/A * @param atts The SAX attribute list.
286N/A */
286N/A public void fireGenerateEvent(int eventType, String name, Attributes atts);
286N/A
286N/A /**
286N/A * Fire characters, cdata events.
286N/A *
286N/A * @param eventType One of the EVENTTYPE_XXX constants.
286N/A * @param ch The char array from the SAX event.
286N/A * @param start The start offset to be used in the char array.
286N/A * @param length The end offset to be used in the chara array.
286N/A */
286N/A public void fireGenerateEvent(int eventType, char ch[], int start, int length);
286N/A
286N/A /**
286N/A * Fire processingInstruction events.
286N/A *
286N/A * @param eventType One of the EVENTTYPE_XXX constants.
286N/A * @param name The name of the processing instruction.
286N/A * @param data The processing instruction data.
286N/A */
286N/A public void fireGenerateEvent(int eventType, String name, String data);
286N/A
286N/A
286N/A /**
286N/A * Fire comment and entity ref events.
286N/A *
286N/A * @param eventType One of the EVENTTYPE_XXX constants.
286N/A * @param data The comment or entity ref data.
286N/A */
286N/A public void fireGenerateEvent(int eventType, String data);
286N/A
286N/A}