pbwest 2002/10/09 20:16:12 Modified: src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design FOAttributes.java Log: Remove xmlns attributes before processing. Delete Attributes object from event after processing. Revision Changes Path No revision No revision 1.1.2.8 +10 -4 xml-fop/src/org/apache/fop/fo/Attic/FOAttributes.java Index: FOAttributes.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/FOAttributes.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- FOAttributes.java 9 Oct 2002 05:57:49 -0000 1.1.2.7 +++ FOAttributes.java 10 Oct 2002 03:16:12 -0000 1.1.2.8 @@ -114,6 +114,10 @@ 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 attrValue = attributes.getValue(i); int attrUriIndex = foNode.namespaces.getURIIndex(attrUri); @@ -132,7 +136,7 @@ } catch (PropertyException e) { // Not known - ignore MessageHandler.errorln(event.getQName() + " " - + attributes.getQName(i) + + attrQName + " not recognized. Ignoring."); } } else { // Not the XSL FO namespace @@ -169,6 +173,8 @@ foAttrKeys = (Integer[])(foAttrMap.keySet().toArray(integerArray)); Arrays.sort(foAttrKeys); } + // Finished with the Attributes object + event.setAttributes(null); } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]