cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2004/03/08 13:54:55 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Updated copyright dates Revision ChangesPath No revision No revision 1.1.2.9 +7 -10 xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- FOAttributes.java 19 Feb 2004 03:11:56 - 1.1.2.8 +++ FOAttributes.java 8 Mar 2004 21:54:55 - 1.1.2.9 @@ -1,11 +1,6 @@ /* - * FOAttributes.java - * $Id$ - * - * Created: Wed Nov 14 15:19:51 2001 - * * - * Copyright 1999-2003 The Apache Software Foundation. + * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -19,10 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * + * $Id$ * - * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a - * @version $Revision$ $Name$ + * Created: Wed Nov 14 15:19:51 2001 */ package org.apache.fop.fo; @@ -43,6 +37,9 @@ /** * The FO Attributes data structures and methods needed to manage the * Attributes associated with FO nodes. + * + * @author a href=mailto:[EMAIL PROTECTED]Peter B. West/a + * @version $Revision$ $Name$ */ public class FOAttributes { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2004/01/14 07:07:46 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Changed constructor signature to take XMLEvent instead of FoXMLEvent Test for CHARACTERS event now performed using event.type rather than event.foType Revision ChangesPath No revision No revision 1.1.2.5 +6 -6 xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- FOAttributes.java 5 Jan 2004 02:52:09 - 1.1.2.4 +++ FOAttributes.java 14 Jan 2004 15:07:46 - 1.1.2.5 @@ -68,7 +68,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.Ints; import org.apache.fop.fo.expr.PropertyException; -import org.apache.fop.xml.FoXMLEvent; +import org.apache.fop.xml.XMLEvent; import org.apache.fop.xml.XMLNamespaces; /** @@ -135,7 +135,7 @@ * @param foNode - the ttFONode/tt with which these attributes are * associated. */ -public FOAttributes(FoXMLEvent event, FONode foNode) throws FOPException { +public FOAttributes(XMLEvent event, FONode foNode) throws FOPException { // If the event is null, there is no event associated with this // node, probably because this is a manufactured node; e.g., @@ -143,7 +143,7 @@ // includes an empty foAttrMap HashMap. if (event == null) return; -if (event.getFoType() == FObjectNames.PCDATA) +if (event.getType() == XMLEvent.CHARACTERS) return; // go with the empty foAttrMap // Create the foAttrMap. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2004/01/04 18:52:10 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Removed redundant casts. Flagged by Eclipse. Revision ChangesPath No revision No revision 1.1.2.4 +5 -5 xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- FOAttributes.java 1 Jan 2004 12:39:30 - 1.1.2.3 +++ FOAttributes.java 5 Jan 2004 02:52:09 - 1.1.2.4 @@ -210,7 +210,7 @@ * ttPropNames/tt. */ public Map getFixedFoAttrMap() { -return Collections.unmodifiableMap((Map)foAttrMap); +return Collections.unmodifiableMap(foAttrMap); } /** @@ -274,7 +274,7 @@ */ public Map getAttrMap(int uriIndex) { if (uriIndex == XMLNamespaces.DefAttrNSIndex) -return Collections.unmodifiableMap((Map)foAttrMap); +return Collections.unmodifiableMap(foAttrMap); if (nSpaceAttrMaps != null) { if (uriIndex = nSpaceAttrMaps.size()) return null; return Collections.unmodifiableMap - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2004/01/01 04:39:30 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Remove intern() calls. Slows processing to no obvious benefit. integerArray made final. Revision ChangesPath No revision No revision 1.1.2.3 +6 -6 xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- FOAttributes.java 28 Dec 2003 05:22:07 - 1.1.2.2 +++ FOAttributes.java 1 Jan 2004 12:39:30 - 1.1.2.3 @@ -116,7 +116,7 @@ * A static array of ttInteger/tt as a template for the generation * of the ifoAttrKeys/i array. */ -private static Integer[] integerArray +private static final Integer[] integerArray = new Integer[] { Ints.consts.get(0) }; /** @@ -151,8 +151,8 @@ if (attributes == null) throw new FOPException (No Attributes in XMLEvent); for (int i = 0; i attributes.getLength(); i++) { -String attrUri = attributes.getURI(i).intern(); -String attrLocalname = attributes.getLocalName(i).intern(); +String attrUri = attributes.getURI(i); +String attrLocalname = attributes.getLocalName(i); String attrValue = attributes.getValue(i); int attrUriIndex = foNode.namespaces.getURIIndex(attrUri); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fo FOAttributes.java
pbwest 2003/12/27 21:22:07 Modified:src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Eliminated checks for xmlns* in line with removal of namespace-prefixes feature from parser. Localised some varialbe references. Interned LocalName. Revision ChangesPath No revision No revision 1.1.2.2 +10 -18xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- FOAttributes.java 5 Jul 2003 19:26:05 - 1.1.2.1 +++ FOAttributes.java 28 Dec 2003 05:22:07 - 1.1.2.2 @@ -150,35 +150,26 @@ Attributes attributes = event.getAttributes(); if (attributes == null) throw new FOPException (No Attributes in XMLEvent); -int propIndex; -HashMap tmpHash; for (int i = 0; i attributes.getLength(); i++) { -String attrUri = attributes.getURI(i); -String attrLocalname = attributes.getLocalName(i); -String attrQName = attributes.getQName(i); -int sep = attrQName.indexOf(':'); -String prefix = attrQName.substring(0, (sep == -1 ? 0 : sep)); -if (prefix.equals(xmlns)) break; +String attrUri = attributes.getURI(i).intern(); +String attrLocalname = attributes.getLocalName(i).intern(); String attrValue = attributes.getValue(i); int attrUriIndex = foNode.namespaces.getURIIndex(attrUri); //System.out.println(FONode: + event); if (attrUriIndex == XMLNamespaces.DefAttrNSIndex) { -// Standard FO namespace -// Catch default namespace declaration here. -if (attrLocalname.equals(xmlns)) break; +// Standard attribute namespace // Is this a known (valid) property? -propIndex = PropNames.getPropertyIndex(attrLocalname); +int propIndex = PropNames.getPropertyIndex(attrLocalname); // Known attribute name foAttrMap.put(Ints.consts.get(propIndex), attrValue); } else { // Not the XSL FO namespace -int j; if (nSpaceAttrMaps == null) { //Create the list System.out.println(Creating nSpaceAttrMaps); nSpaceAttrMaps = new ArrayList(attrUriIndex + 1); // Add the fo list -for (j = 0; j XMLNamespaces.DefAttrNSIndex; j++) +for (int j = 0; j XMLNamespaces.DefAttrNSIndex; j++) nSpaceAttrMaps.add(new HashMap(0)); System.out.println(Adding foAttrMap); @@ -186,10 +177,11 @@ } // Make sure there are elements between the last current // and the one to be added -for (j = nSpaceAttrMaps.size(); j = attrUriIndex; j++) +for (int j = nSpaceAttrMaps.size(); j = attrUriIndex; j++) nSpaceAttrMaps.add(new HashMap(0)); // Does a HashMap exist for this namespace? +HashMap tmpHash; if ((tmpHash = (HashMap)nSpaceAttrMaps.get(attrUriIndex)) == null) { tmpHash = new HashMap(1); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]