You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/06/06 09:42:02 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AttributeList.java
morten 01/06/06 00:42:01
Modified: java/src/org/apache/xalan/xsltc/runtime AttributeList.java
Log:
Added a constructor for copying an org.xml.sax.Attributes to our
org.apache.xalan.xsltc.runtime.AttributeList.
PR: n/a
Obtained from: n/a
Submitted by: morten@xml.apache.org
Reviewed by: morten@xml.apache.org
Revision Changes Path
1.4 +15 -1 xml-xalan/java/src/org/apache/xalan/xsltc/runtime/AttributeList.java
Index: AttributeList.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/AttributeList.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AttributeList.java 2001/05/22 17:27:11 1.3
+++ AttributeList.java 2001/06/06 07:41:56 1.4
@@ -1,5 +1,5 @@
/*
- * $Id: AttributeList.java,v 1.3 2001/05/22 17:27:11 morten Exp $
+ * $Id: AttributeList.java,v 1.4 2001/06/06 07:41:56 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -63,6 +63,7 @@
package org.apache.xalan.xsltc.runtime;
import org.xml.sax.SAXException;
+import org.xml.sax.Attributes;
import java.util.Vector;
import java.util.Enumeration;
@@ -89,6 +90,19 @@
_qnames = new Vector();
_uris = new Vector();
_length = 0;
+ }
+
+ /**
+ * Attributes clone constructor
+ */
+ public AttributeList(org.xml.sax.Attributes attributes) {
+ this();
+ if (attributes != null) {
+ final int count = attributes.getLength();
+ for (int i = 0; i < count; i++) {
+ add(attributes.getQName(i),attributes.getValue(i));
+ }
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org