cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/11/29 09:35:24 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Add id field. Revision ChangesPath No revision No revision 1.1.2.9 +16 -7 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java Index: XMLEvent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- XMLEvent.java 27 Nov 2002 03:25:18 - 1.1.2.8 +++ XMLEvent.java 29 Nov 2002 17:35:24 - 1.1.2.9 @@ -67,6 +67,9 @@ protected AttributesImpl attributes; protected XMLNamespaces namespaces; +/** Sequence id for this iXMLEvent/i. */ +public final int id; + /** * The one-argument constructor uses the default initialization values: * NOEVENT for the event itype/i, and null references for all others @@ -74,6 +77,7 @@ */ public XMLEvent (XMLNamespaces namespaces) { this.namespaces = namespaces; +id = namespaces.getSequence(); } /** @@ -84,13 +88,14 @@ String localName, String qName, AttributesImpl attributes, XMLNamespaces namespaces) { +this.namespaces = namespaces; +id = namespaces.getSequence(); this.type = type; this.chars = chars; this.uriIndex = uriIndex; this.localName = localName; this.qName = qName; this.attributes = attributes; -this.namespaces = namespaces; } /** @@ -98,24 +103,26 @@ * ttXMLEvent/tt object. */ public XMLEvent(XMLEvent ev) { +namespaces = ev.namespaces; +id = namespaces.getSequence(); type = ev.type; chars = ev.chars; uriIndex = ev.uriIndex; localName = ev.localName; qName = ev.qName; attributes = ev.attributes; -namespaces = ev.namespaces; } public XMLEvent(int type, String chars, XMLNamespaces namespaces) { +this.namespaces = namespaces; +id = namespaces.getSequence(); this.type = type; this.chars = chars; -this.namespaces = namespaces; } /** * Clear the fields of this event. Provided for pool operations. - * The inamespaces/i field is not cleared. + * Neither the inamespaces/i nor the iid/i field is cleared. * @return the cleared event. */ public XMLEvent clear() { @@ -225,6 +232,8 @@ public String toString() { String tstr; tstr = eventTypeName(type); +tstr = tstr + \nSeq + id; +tstr = tstr + \nNamespaces + namespaces.hashCode(); tstr = tstr + \nURI + uriIndex + + namespaces.getIndexURI(uriIndex); tstr = tstr + \n + Local Name + localName; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/11/26 19:25:18 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Modified clear() to return the event. Revision ChangesPath No revision No revision 1.1.2.8 +6 -4 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java Index: XMLEvent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- XMLEvent.java 23 Nov 2002 14:42:05 - 1.1.2.7 +++ XMLEvent.java 27 Nov 2002 03:25:18 - 1.1.2.8 @@ -116,14 +116,16 @@ /** * Clear the fields of this event. Provided for pool operations. * The inamespaces/i field is not cleared. + * @return the cleared event. */ -public void clear() { +public XMLEvent clear() { type = NOEVENT; chars = null; uriIndex = 0; localName = null; qName = null; attributes = null; +return this; } public int getType() { return type; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/10/24 07:34:31 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Added XMLEvent(int,String,XMLNamespaces) constructor. Revision ChangesPath No revision No revision 1.1.2.6 +11 -3 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java Index: XMLEvent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- XMLEvent.java 19 Oct 2002 03:05:42 - 1.1.2.5 +++ XMLEvent.java 24 Oct 2002 14:34:31 - 1.1.2.6 @@ -107,6 +107,12 @@ namespaces = ev.namespaces; } +public XMLEvent(int type, String chars, XMLNamespaces namespaces) { +this.type = type; +this.chars = chars; +this.namespaces = namespaces; +} + public int getType() { return type; } public void setType(int type) { if (type MIN_XML_EV_TYPE || type MAX_XML_EV_TYPE) { @@ -117,9 +123,11 @@ } public String getChars() { return chars; } + public void setChars(String chars) { this.chars = chars; } + public void setChars(char[] ch, int start, int length) { chars = new String(ch, start, length); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/10/10 10:10:44 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Make components of XMLEvent.UriLocalName public. Revision ChangesPath No revision No revision 1.1.2.4 +6 -6 xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java Index: XMLEvent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- XMLEvent.java 9 Oct 2002 06:08:37 - 1.1.2.3 +++ XMLEvent.java 10 Oct 2002 17:10:44 - 1.1.2.4 @@ -218,11 +218,11 @@ /** * A nested class for holding an passing a URI index and local name - * pair, as used in the contain ttXMLEvent/tt class. + * pair, as used in the containing ttXMLEvent/tt class. */ public static class UriLocalName { -private int uriIndex; -private String localName; +public int uriIndex; +public String localName; /** * @param uriIndex - the index of the namespace URI maintained in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java
pbwest 2002/10/08 23:08:37 Modified:src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java Log: Added eventTypeName(). Revision ChangesPath No revision No revision 1.1.2.3 +26 -25xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java Index: XMLEvent.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- XMLEvent.java 16 Sep 2002 04:26:31 - 1.1.2.2 +++ XMLEvent.java 9 Oct 2002 06:08:37 - 1.1.2.3 @@ -34,6 +34,28 @@ private static final int MIN_XML_EV_TYPE = NOEVENT; private static final int MAX_XML_EV_TYPE = CHARACTERS; +public static final boolean DISCARD_W_SPACE = true; +public static final boolean RETAIN_W_SPACE = false; + +public static String eventTypeName(int type) { +switch (type) { +case NOEVENT: +return NOEVENT; +case STARTDOCUMENT: +return STARTDOCUMENT; +case ENDDOCUMENT: +return ENDDOCUMENT; +case STARTELEMENT: +return STARTELEMENT; +case ENDELEMENT: +return ENDELEMENT; +case CHARACTERS: +return CHARACTERS; +default: +return Unknown type + type; +} +} + // These are made public specifically so the the values of individual // XMLEvent instances can be changed directly, on the assumption that // the basic XML events are unlikely to change. @@ -171,28 +193,7 @@ public String toString() { String tstr; -switch (type) { -case NOEVENT: -tstr = NOEVENT; -break; -case STARTDOCUMENT: -tstr = STARTDOCUMENT; -break; -case ENDDOCUMENT: -tstr = ENDDOCUMENT; -break; -case STARTELEMENT: -tstr = STARTELEMENT; -break; -case ENDELEMENT: -tstr = ENDELEMENT; -break; -case CHARACTERS: -tstr = CHARACTERS; -break; -default: -tstr = Unknown type + type; -} +tstr = eventTypeName(type); tstr = tstr + \nURI + uriIndex + + namespaces.getIndexURI(uriIndex); tstr = tstr + \n + Local Name + localName; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/xml XMLEvent.java XMLSerialHandler.java package.html
pbwest 02/05/07 09:40:46 Added: src/org/apache/fop/xml Tag: FOP_0-20-0_Alt-Design XMLEvent.java XMLSerialHandler.java package.html Log: New files for SAX XML event serialisation. Revision ChangesPath No revision No revision 1.1.2.1 +809 -0xml-fop/src/org/apache/fop/xml/Attic/XMLEvent.java 1.1.2.1 +192 -0xml-fop/src/org/apache/fop/xml/Attic/XMLSerialHandler.java 1.1.2.1 +6 -0 xml-fop/src/org/apache/fop/xml/Attic/package.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]