You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ar...@locus.apache.org on 2000/02/08 02:21:31 UTC
cvs commit: xml-xerces/java/src/org/apache/html/dom HTMLDocumentImpl.java HTMLElementImpl.java
arkin 00/02/07 17:21:30
Modified: java/src/org/apache/html/dom HTMLDocumentImpl.java
HTMLElementImpl.java
Log:
Fixes name lookup to be case insensitive
Revision Changes Path
1.4 +18 -2 xml-xerces/java/src/org/apache/html/dom/HTMLDocumentImpl.java
Index: HTMLDocumentImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLDocumentImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HTMLDocumentImpl.java 2000/02/05 02:25:22 1.3
+++ HTMLDocumentImpl.java 2000/02/08 01:21:30 1.4
@@ -27,7 +27,7 @@
* methods ({@link #getURL}, {@link #getCookie}).
*
*
- * @version $Revision: 1.3 $ $Date: 2000/02/05 02:25:22 $
+ * @version $Revision: 1.4 $ $Date: 2000/02/08 01:21:30 $
* @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
* @see org.w3c.dom.html.HTMLDocument
*/
@@ -372,9 +372,25 @@
}
+ public final NodeList getElementsByTagName( String tagName )
+ {
+ return super.getElementsByTagName( tagName.toUpperCase() );
+ }
+
+
+ public final NodeList getElementsByTagNameNS( String namespaceURI,
+ String localName )
+ {
+ if ( namespaceURI != null && namespaceURI.length() > 0 )
+ return super.getElementsByTagNameNS( namespaceURI, localName.toUpperCase() );
+ else
+ return super.getElementsByTagName( localName.toUpperCase() );
+ }
+
+
public Element createElementNS( String namespaceURI, String qualifiedName )
{
- if ( namespaceURI == null )
+ if ( namespaceURI == null || namespaceURI.length() == 0 )
return createElement( qualifiedName );
else
return super.createElementNS( namespaceURI, qualifiedName );
1.2 +49 -1 xml-xerces/java/src/org/apache/html/dom/HTMLElementImpl.java
Index: HTMLElementImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLElementImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HTMLElementImpl.java 1999/12/14 21:27:04 1.1
+++ HTMLElementImpl.java 2000/02/08 01:21:30 1.2
@@ -16,7 +16,7 @@
* add their own specific attributes.
*
*
- * @version $Revision: 1.1 $ $Date: 1999/12/14 21:27:04 $
+ * @version $Revision: 1.2 $ $Date: 2000/02/08 01:21:30 $
* @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
* @see org.w3c.dom.html.HTMLElement
*/
@@ -151,8 +151,56 @@
else
removeAttribute( name );
}
+
+
+ public Attr getAttributeNode( String attrName )
+ {
+ return super.getAttributeNode( attrName.toLowerCase() );
+ }
+
+
+ public Attr getAttributeNodeNS( String namespaceURI,
+ String localName )
+ {
+ if ( namespaceURI != null && namespaceURI.length() > 0 )
+ return super.getAttributeNodeNS( namespaceURI, localName );
+ else
+ return super.getAttributeNode( localName.toLowerCase() );
+ }
+ public String getAttribute( String attrName )
+ {
+ return super.getAttribute( attrName.toLowerCase() );
+ }
+
+
+ public String getAttributeNS( String namespaceURI,
+ String localName )
+ {
+ if ( namespaceURI != null && namespaceURI.length() > 0 )
+ return super.getAttributeNS( namespaceURI, localName );
+ else
+ return super.getAttribute( localName.toLowerCase() );
+ }
+
+
+ public final NodeList getElementsByTagName( String tagName )
+ {
+ return super.getElementsByTagName( tagName.toUpperCase() );
+ }
+
+
+ public final NodeList getElementsByTagNameNS( String namespaceURI,
+ String localName )
+ {
+ if ( namespaceURI != null && namespaceURI.length() > 0 )
+ return super.getElementsByTagNameNS( namespaceURI, localName.toUpperCase() );
+ else
+ return super.getElementsByTagName( localName.toUpperCase() );
+ }
+
+
/**
* Convenience method used to capitalize a one-off attribute value before it
* is returned. For example, the align values "LEFT" and "left" will both