You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@apache.org on 2001/02/14 19:29:32 UTC

cvs commit: xml-xerces/java/tools junit.jar optional.jar ant.jar

lehors      01/02/14 10:29:31

  Modified:    java     Tag: xerces_j_2 Makefile build.sh build.xml
               java/data Tag: xerces_j_2 personal-schema.xml personal.xsd
               java/docs Tag: xerces_j_2 docs-book.xml releases.xml
                        schema.xml
               java/samples/dom Tag: xerces_j_2 Writer.java
               java/src Tag: xerces_j_2 Makefile Makefile.incl
               java/src/org/apache/html/dom Tag: xerces_j_2
                        HTMLAnchorElementImpl.java
                        HTMLAppletElementImpl.java HTMLAreaElementImpl.java
                        HTMLBRElementImpl.java HTMLBaseElementImpl.java
                        HTMLBaseFontElementImpl.java
                        HTMLBodyElementImpl.java HTMLBuilder.java
                        HTMLButtonElementImpl.java HTMLCollectionImpl.java
                        HTMLDListElementImpl.java
                        HTMLDirectoryElementImpl.java
                        HTMLDivElementImpl.java HTMLElementImpl.java
                        HTMLFieldSetElementImpl.java
                        HTMLFontElementImpl.java HTMLFormControl.java
                        HTMLFormElementImpl.java HTMLFrameElementImpl.java
                        HTMLFrameSetElementImpl.java HTMLHRElementImpl.java
                        HTMLHeadElementImpl.java
                        HTMLHeadingElementImpl.java
                        HTMLHtmlElementImpl.java HTMLIFrameElementImpl.java
                        HTMLImageElementImpl.java HTMLInputElementImpl.java
                        HTMLIsIndexElementImpl.java HTMLLIElementImpl.java
                        HTMLLabelElementImpl.java
                        HTMLLegendElementImpl.java HTMLLinkElementImpl.java
                        HTMLMapElementImpl.java HTMLMenuElementImpl.java
                        HTMLMetaElementImpl.java HTMLModElementImpl.java
                        HTMLOListElementImpl.java
                        HTMLObjectElementImpl.java
                        HTMLOptGroupElementImpl.java
                        HTMLOptionElementImpl.java
                        HTMLParagraphElementImpl.java
                        HTMLParamElementImpl.java HTMLPreElementImpl.java
                        HTMLQuoteElementImpl.java
                        HTMLScriptElementImpl.java
                        HTMLSelectElementImpl.java
                        HTMLStyleElementImpl.java
                        HTMLTableCaptionElementImpl.java
                        HTMLTableCellElementImpl.java
                        HTMLTableColElementImpl.java
                        HTMLTableElementImpl.java
                        HTMLTableRowElementImpl.java
                        HTMLTableSectionElementImpl.java
                        HTMLTextAreaElementImpl.java
                        HTMLTitleElementImpl.java HTMLUListElementImpl.java
               java/src/org/apache/xerces/dom Tag: xerces_j_2 AttrImpl.java
                        AttrNSImpl.java AttributeMap.java DocumentImpl.java
                        DocumentTypeImpl.java ElementImpl.java
                        ElementNSImpl.java EntityImpl.java
                        EntityReferenceImpl.java Makefile NodeImpl.java
                        ParentNode.java
               java/src/org/apache/xerces/jaxp Tag: xerces_j_2
                        DocumentBuilderFactoryImpl.java
                        DocumentBuilderImpl.java SAXParserFactoryImpl.java
                        SAXParserImpl.java
               java/src/org/apache/xml/serialize Tag: xerces_j_2
                        BaseMarkupSerializer.java Encodings.java
                        HTMLSerializer.java HTMLdtd.java Makefile
                        OutputFormat.java TextSerializer.java
                        XMLSerializer.java
               java/tests/dom/events Tag: xerces_j_2 Makefile Test.java
               java/tests/dom/mem Tag: xerces_j_2 Test.java
               java/tests/dom/range Tag: xerces_j_2 Test.java
               java/tests/dom/serialize Tag: xerces_j_2
                        TestSerializeDOMIn.java TestSerializeDOMOut.java
               java/tools Tag: xerces_j_2 ant.jar
  Added:       java/src/org/apache/xml/serialize Tag: xerces_j_2
                        EncodingInfo.java SieveEncodingInfo.java
               java/tests/dom/events Tag: xerces_j_2 EventReporter.java
               java/tests/dom/range Tag: xerces_j_2 TestCompare.java
               java/tools Tag: xerces_j_2 junit.jar optional.jar
  Removed:     java/src/org/apache/xerces/dom Tag: xerces_j_2
                        ChildAndParentNode.java
  Log:
  merged in latest changes from main branch, labeled merge_to_x2_021301
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.19.2.2  +53 -1     xml-xerces/java/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/Makefile,v
  retrieving revision 1.19.2.1
  retrieving revision 1.19.2.2
  diff -u -r1.19.2.1 -r1.19.2.2
  --- Makefile	2000/12/12 19:07:09	1.19.2.1
  +++ Makefile	2001/02/14 18:28:41	1.19.2.2
  @@ -1,5 +1,10 @@
   # Top Makefile
   
  +# Note:  To produce tar.gz files instead of .zip files when 
  +# make'ing the pachages, change the package_bin dependency to
  +# ${BINTARFILE} from ${BINZIPFILE} and do the same for
  +# package_src.
  +
   all:: compile jars docs apidocs package
   
   TOP = .
  @@ -63,6 +68,37 @@
   	$(JAR) cvfM ${BINZIPFILE} xerces-${PRODUCTVERSION} 
   	$(MV) xerces-${PRODUCTVERSION} bin
   
  +${BINTARFILE}:: ./src/classfiles_updated
  +
  +	@echo Building the binary release package
  +	${MKDIR} bin
  +	${MKDIR} bin/samples
  +	${MKDIR} bin/samples/dom
  +	${CP} samples/dom/*.java bin/samples/dom
  +	${MKDIR} bin/samples/dom/traversal
  +	${CP} samples/dom/traversal/*.java bin/samples/dom/traversal
  +	${MKDIR} bin/samples/dom/wrappers
  +	${CP} samples/dom/wrappers/*.java bin/samples/dom/wrappers
  +	${MKDIR} bin/samples/sax
  +	${CP} samples/sax/*.java bin/samples/sax
  +	${MKDIR} bin/samples/sax/helpers
  +	${CP} samples/sax/helpers/*.java bin/samples/sax/helpers
  +	${MKDIR} bin/samples/ui
  +	${CP} samples/ui/*.java bin/samples/ui
  +	${MKDIR} bin/samples/util
  +	${CP} samples/util/*.java bin/samples/util
  +	${CP} -r docs bin
  +	${RM} -r bin/docs/CVS
  +	${RM} -r bin/docs/dtd/CVS
  +	${RM} -r bin/docs/*.xml bin/docs/dtd/*.dtd bin/docs/dtd/*.ent
  +	${CP} -r data bin
  +	${RM} -r bin/data/CVS
  +	${CP} LICENSE bin
  +	$(MV) bin xerces-${PRODUCTVERSION}
  +	$(TAR) cvf ${BINTARFILE} xerces-${PRODUCTVERSION} 
  +	$(GZIP) ${BINTARFILE} 
  +	$(MV) xerces-${PRODUCTVERSION} bin
  +
   package_src:: ${SRCZIPFILE}
   ${SRCZIPFILE}: ./src/classfiles_updated
   	@echo Building the source release package
  @@ -79,8 +115,24 @@
   	$(JAR) cvfM ${SRCZIPFILE} xerces-${PRODUCTVERSION} 
   	$(MV) xerces-${PRODUCTVERSION} source
   
  +${SRCTARFILE}: ./src/classfiles_updated
  +	@echo Building the source release package
  +	${MAKE} -C src package_src
  +	${CP} -r data source
  +	${RM} -r source/data/CVS
  +	${MKDIR} source/docs
  +	${MKDIR} source/docs/dtd
  +	${CP} docs/*.xml source/docs
  +	${CP} LICENSE source
  +	${CP} docs/dtd/*.dtd source/docs/dtd
  +	${CP} docs/dtd/*.ent source/docs/dtd
  +	$(MV) source xerces-${PRODUCTVERSION}
  +	$(TAR) cvf ${SRCTARFILE} xerces-${PRODUCTVERSION} 
  +	$(GZIP) ${SRCTARFILE}
  +	$(MV) xerces-${PRODUCTVERSION} source
  +
   clean::
   	${MAKE} -C src clean
   	${MAKE} -C samples clean
   	${RM} -rf bin class source docs/apiDocs docs/html 
  -	${RM} ${BINZIPFILE} ${SRCZIPFILE}
  +	${RM} ${BINZIPFILE} ${SRCZIPFILE} ${BINGZFILE} ${SRCGZFILE}
  
  
  
  1.4.2.2   +1 -1      xml-xerces/java/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/build.sh,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- build.sh	2000/11/30 00:21:08	1.4.2.1
  +++ build.sh	2001/02/14 18:28:41	1.4.2.2
  @@ -17,7 +17,7 @@
   # if we're on a Windows box make it ;
   uname | grep WIN && CLPATHSEP=\;
   
  -LOCALCLASSPATH="$JAVA_HOME/lib/tools.jar${CLPATHSEP}${JAVA_HOME}/lib/classes.zip${CLPATHSEP}./tools/ant.jar${CLPATHSEP}./tools/xerces.jar${CLPATHSEP}./tools/xalan.jar${CLPATHSEP}./tools/stylebook-1.0-b2.jar${CLPATHSEP}./tools/style-apachexml.jar"
  +LOCALCLASSPATH="$JAVA_HOME/lib/tools.jar${CLPATHSEP}${JAVA_HOME}/lib/classes.zip${CLPATHSEP}./tools/ant.jar${CLPATHSEP}./tools/xerces.jar${CLPATHSEP}./tools/xalan.jar${CLPATHSEP}./tools/stylebook-1.0-b2.jar${CLPATHSEP}./tools/style-apachexml.jar${CLPATHSEP}./tools/junit.jar"
   ANT_HOME=./tools
   
   echo Building with classpath \"$LOCALCLASSPATH\"
  
  
  
  1.14.2.8  +114 -58   xml-xerces/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/build.xml,v
  retrieving revision 1.14.2.7
  retrieving revision 1.14.2.8
  diff -u -r1.14.2.7 -r1.14.2.8
  --- build.xml	2000/12/26 02:31:51	1.14.2.7
  +++ build.xml	2001/02/14 18:28:41	1.14.2.8
  @@ -51,7 +51,7 @@
   Copyright:
     Copyright (c) 2000 The Apache Software Foundation.
   
  -   $Id: build.xml,v 1.14.2.7 2000/12/26 02:31:51 andyc Exp $
  +   $Id: build.xml,v 1.14.2.8 2001/02/14 18:28:41 lehors Exp $
   
   ==================================================================== -->
   
  @@ -63,10 +63,10 @@
       <property name="version" value="2.0.0 (alpha)"/>
       <property name="version_postfix" value=".2.0.0.alpha"/>
       <property name="appendit" value="2_0_0_alpha"/>
  -    <property name="year" value="1999-2000"/>
  -	<property name="copyright" value="Copyright &#169; ${year} Apache XML Project. All Rights Reserved."/>
  +    <property name="year" value="1999-2001"/>
  +    <property name="copyright" value="Copyright &#169; ${year} Apache XML Project. All Rights Reserved."/>
   
  -	<echo message= "---------------- ${Name} ${version} [${year}] ---------------"/>
  +    <echo message= "---------------- ${Name} ${version} [${year}] ---------------"/>
       <property name="build.compiler" value="classic"/>
       <property name="debug" value="off"/>
       <property name="optimize" value="on"/>
  @@ -156,19 +156,26 @@
       <mkdir dir="${build.dest}/META-INF"/>
       <mkdir dir="${build.dest}/META-INF/services"/>
   
  -    <copyfile src="src/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory"
  -      dest="${build.dest}/META-INF/services/javax.xml.parsers.DocumentBuilderFactory"/>
  +    <copy file="${src.dir}/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory"
  +      tofile="${build.dest}/META-INF/services/javax.xml.parsers.DocumentBuilderFactory"/>
   
  -    <copyfile src="src/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory"
  -      dest="${build.dest}/META-INF/services/javax.xml.parsers.SAXParserFactory"/>
  +    <copy file="${src.dir}/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory"
  +      tofile="${build.dest}/META-INF/services/javax.xml.parsers.SAXParserFactory"/>
   
       <!-- copy src files -->
  -    <copydir src="${src.dir}" dest="${build.src}" includes="**/Makefile, **/Makefile.incl, javax/**, org/**"
  -             excludes="**/classfiles_updated **/CVS* **/.#* **/XMLMessages.java
  +    <copy todir="${build.src}">
  +        <fileset 
  +            dir="${src.dir}"
  +            includes="**/Makefile, **/Makefile.incl, javax/**, org/**" 
  +            excludes="**/classfiles_updated **/CVS* **/.#* **/XMLMessages.java
                          **/SchemaImporter.java **/RevalidatingDOMParser.java
                          **/DatatypeContentModel.java **/ComplexTypeInfo.java
  -                       **/DTDImporter.java "/>
  -	<deltree dir="${build.src}/whiteboard"/>
  +                       **/DTDImporter.java ">
  +        </fileset>
  +    </copy>
  +    
  +    
  +    <delete dir="${build.src}/whiteboard"/>
   
       <!-- substitute tokens as needed -->
       <replace file="${build.src}/${version.file}" token="@@version@@" value="${version}"/>
  @@ -181,10 +188,10 @@
     <target name="compile" depends="prepare-src">
       <javac srcdir="${build.src}"
              excludes="**/RevalidatingDOMParser.java "
  -    	   destdir="${build.dest}"
  -    	   debug="${debug}"
  -	       deprecation="${deprecation}"
  -	       optimize="${optimize}" />
  +           destdir="${build.dest}"
  +           debug="${debug}"
  +           deprecation="${deprecation}"
  +           optimize="${optimize}" />
     </target>
   
     <!-- =================================================================== -->
  @@ -199,9 +206,11 @@
     <!-- =================================================================== -->
     <!-- Compiles the samples                                                -->
     <!-- =================================================================== -->
  -  <target name="samples" depends="jar">
  +  <target name="samples" depends="compile">
       <mkdir dir="${build.samples}"/>
  -    <copydir src="${samples.dir}" dest="${build.samples}" />
  +    <copy todir="${build.samples}" >
  +        <fileset dir="${samples.dir}" />
  +    </copy>
       <javac srcdir="${build.samples}"
              destdir="${build.dest}"
              classpath="${build.dir}/${name}.jar"
  @@ -213,7 +222,9 @@
     <!-- =================================================================== -->
     <target name="tests" depends="samples">
       <mkdir dir="${build.tests}"/>
  -    <copydir src="${tests.dir}" dest="${build.tests}" />
  +    <copy todir="${build.tests}">
  +        <fileset dir="${tests.dir}" />
  +    </copy>
       <javac srcdir="${build.tests}"
              destdir="${build.dest}"
              classpath="${build.dir}/${name}.jar"
  @@ -240,7 +251,7 @@
     <!-- Generate HTML docs                                                  -->
     <!-- =================================================================== -->
     <target name="docs" depends="prepare, prepare-docs">
  -	<echo message="Building docs for ${Name} ${version} ..." />
  +    <echo message="Building docs for ${Name} ${version} ..." />
       <java fork="yes"
             classpath="${java.class.path}:${doc.generator.package}"
             classname="${doc.generator}"
  @@ -268,30 +279,53 @@
     <!-- =================================================================== -->
     <target name="pack-src" depends="init">
       <echo message="Building the source distribution files (zip,tar)"/>
  -    <deltree dir="${distbin.dir}"/>
  +    <delete dir="${distbin.dir}"/>
   
       <mkdir dir="${distsrc.dir}"/>
       <mkdir dir="${distsrc.dir}/src"/>
       <mkdir dir="${distsrc.dir}/data"/>
       <mkdir dir="${distsrc.dir}/docs"/>
       <mkdir dir="${distsrc.dir}/samples"/>
  -
  -    <copydir src="${src.dir}" dest="${distsrc.dir}/src" excludes="**/CVS*, **/.#*, **/*.class"
  -             includes="**/Makefile, **/Makefile.incl, org/**, javax/**"/>
  -    <copydir src="${data.dir}" dest="${distsrc.dir}/data" excludes="**/CVS*, **/.#*"/>
  -    <copydir src="${docs.dir}" dest="${distsrc.dir}/docs"
  -             excludes="**/CVS*, **/*.#*, pdf/**, html/**, **/apiDocs*"/>
  -    <copydir src="${samples.dir}" dest="${distsrc.dir}/samples" excludes="**/CVS*, **/*.#*"/>
   
  -    <copyfile src="Makefile" dest="${distsrc.dir}/Makefile"/>
  -    <copyfile src="LICENSE" dest="${distsrc.dir}/LICENSE"/>
  -    <copyfile src="README" dest="${distsrc.dir}/README"/>
  -    <copyfile src="Readme.html" dest="${distsrc.dir}/Readme.html"/>
  -    <copyfile src="STATUS" dest="${distsrc.dir}/STATUS"/>
  -    <copyfile src="build.xml" dest="${distsrc.dir}/build.xml"/>
  -    <copyfile src="${basedir}/build.sh" dest="${distsrc.dir}/build.sh" />
  -    <chmod src="${distsrc.dir}/build.sh" perm="ugo+rx" />
  -    <copyfile src="${basedir}/build.bat" dest="${distsrc.dir}/build.bat" />
  +    <copy todir="${distsrc.dir}/src" >
  +        <fileset
  +            dir="${src.dir}"  
  +            includes="**/Makefile, **/Makefile.incl, org/**, javax/**"
  +            excludes="**/CVS*, **/.#*, **/*.class"
  +        />
  +    </copy>
  +
  +
  +    <copy todir="${distsrc.dir}/data" >
  +        <fileset
  +            dir="${data.dir}"  
  +            excludes="**/CVS*, **/.#*"
  +        />
  +    </copy>
  +
  +    <copy todir="${distsrc.dir}/docs" >
  +        <fileset
  +            dir="${docs.dir}" 
  +            excludes="**/CVS*, **/*.#*, pdf/**, html/**, **/apiDocs*"
  +        />
  +    </copy>
  +
  +    <copy todir="${distsrc.dir}/samples" >
  +        <fileset
  +            dir="${samples.dir}"  
  +            excludes="**/CVS*, **/*.#*"
  +        />
  +    </copy>
  +
  +    <copy file="Makefile" tofile="${distsrc.dir}/Makefile"/>
  +    <copy file="LICENSE" tofile="${distsrc.dir}/LICENSE"/>
  +    <copy file="README" tofile="${distsrc.dir}/README"/>
  +    <copy file="Readme.html" tofile="${distsrc.dir}/Readme.html"/>
  +    <copy file="STATUS" tofile="${distsrc.dir}/STATUS"/>
  +    <copy file="build.xml" tofile="${distsrc.dir}/build.xml"/>
  +    <copy file="${basedir}/build.sh" tofile="${distsrc.dir}/build.sh" />
  +    <chmod file="${distsrc.dir}/build.sh" perm="ugo+rx" />
  +    <copy file="${basedir}/build.bat" tofile="${distsrc.dir}/build.bat" />
   
       <zip zipfile="${build.dir}/${Name}-src${version_postfix}.zip" basedir="${build.dir}"
            includes="${name}-${appendit}/**" excludes="*.class"/>
  @@ -308,25 +342,42 @@
     <target name="pack-bin" depends="jar, sampjar, javadocs, docs">
   
       <echo message="Building the binary distribution files (zip,tar)"/>
  -    <deltree dir="${distbin.dir}"/>
  +    <delete dir="${distbin.dir}"/>
       <mkdir dir="${distbin.dir}"/>
       <mkdir dir="${distbin.dir}/data"/>
       <mkdir dir="${distbin.dir}/docs"/>
       <mkdir dir="${distbin.dir}/docs/html"/>
       <mkdir dir="${distbin.dir}/docs/apiDocs"/>
       <mkdir dir="${distsrc.dir}/samples"/>
  -
   
  -    <copydir src="${data.dir}" dest="${distbin.dir}/data" excludes="**/CVS*, **/*.#*"/>
  -    <copydir src="${build.docs}" dest="${distbin.dir}/docs/html"/>
  -    <copydir src="${build.javadocs}" dest="${distbin.dir}/docs/apiDocs"/>
  +    <copy todir="${distbin.dir}/data" >
  +        <fileset
  +            dir="${data.dir}"
  +            excludes="**/CVS*, **/*.#*"
  +        />
  +    </copy>
  +
  +    <copy todir="${distbin.dir}/docs/html" >
  +        <fileset dir="${build.docs}" />
  +    </copy>
  +
  +    <copy todir="${distbin.dir}/docs/apiDocs" >
  +        <fileset dir="${build.javadocs}" />
  +    </copy>
  +
  +    <copy file="${build.dir}/${name}.jar" tofile="${distbin.dir}/${name}.jar"/>
  +    <copy file="${build.dir}/${name}Samples.jar" tofile="${distbin.dir}/${name}Samples.jar"/>
  +
  +    <copy file="LICENSE" tofile="${distbin.dir}/LICENSE"/>
  +    <copy file="Readme.html" tofile="${distbin.dir}/Readme.html"/>
  +
  +    <copy todir="${distsrc.dir}/samples" >
  +        <fileset
  +            dir="${samples.dir}"
  +            excludes="**/CVS*, **/*.#*"
  +        />
  +    </copy>
   
  -    <copyfile src="${build.dir}/${name}.jar" dest="${distbin.dir}/${name}.jar"/>
  -    <copyfile src="${build.dir}/${name}Samples.jar" dest="${distbin.dir}/${name}Samples.jar"/>
  -
  -    <copyfile src="LICENSE" dest="${distbin.dir}/LICENSE"/>
  -    <copyfile src="Readme.html" dest="${distbin.dir}/Readme.html"/>
  -
       <copydir src="${samples.dir}" dest="${distsrc.dir}/samples" excludes="**/CVS*, **/*.#*"/>
   
   
  @@ -343,40 +394,45 @@
     <!-- Do a sanity test using xercesSamples.jar                            -->
     <!-- =================================================================== -->
     <target name="test" depends="sampjar">
  -	<echo message="Performing sanity test for ${Name} ${version} ..." />
  -	<echo message="Using classpath=&apos;${build.dir}/${name}Samples.jar;${build.dir}/${name}.jar&apos;" />
  -	<echo message="Running sax.Counter ..." />
  +    <echo message="Performing sanity test for ${Name} ${version} ..." />
  +    <echo message="Using classpath=&apos;${build.dir}/${name}Samples.jar;${build.dir}/${name}.jar&apos;" />
  +    <echo message="Running SAXCount ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar;"
             classname="sax.Counter"
             args="${data.dir}/personal.xml"/>
  -	<echo message="Running sax.Writer ..." />
  +    <echo message="Running sax.Writer ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="sax.Writer"
             args="${data.dir}/personal.xml"/>
  -	<echo message="Running dom.Counter ..." />
  +    <echo message="Running dom.Counter ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="dom.Counter"
             args="${data.dir}/personal.xml"/>
  -	<echo message="Running dom.Writer ..." />
  +    <echo message="Running dom.Writer ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="dom.Writer"
             args="${data.dir}/personal.xml"/>
  +    <echo message="Running DOMFilter ..." />
  +    <java fork="yes"
  +          classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
  +          classname="dom.DOMFilter"
  +          args="-p dom.wrappers.DOMParser ${data.dir}/personal.xml"/>
       <!-- The following are samples but not command-line applications.
  -	<echo message="Running IteratorView ..." />
  +    <echo message="Running IteratorView ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="dom.traversal.IteratorView"
             args="${data.dir}/personal.xml"/>
  -	<echo message="Running TreeWalkerView ..." />
  +    <echo message="Running TreeWalkerView ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="dom.traversal.TreeWalkerView"
             args="${data.dir}/personal.xml"/>
  -	<echo message="Running TreeViewer ..." />
  +    <echo message="Running TreeViewer ..." />
       <java fork="yes"
             classpath="${build.dir}/${name}Samples.jar:${build.dir}/${name}.jar"
             classname="dom.TreeViewer"
  @@ -402,7 +458,7 @@
     <target name="clean" depends="init">
       <delete file="${name}.jar"/>
       <delete file="${name}Samples.jar"/>
  -    <deltree dir="${build.dir}"/>
  +    <delete dir="${build.dir}"/>
     </target>
   
   </project>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +1 -1      xml-xerces/java/data/personal-schema.xml
  
  Index: personal-schema.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/data/personal-schema.xml,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- personal-schema.xml	2000/05/18 20:46:26	1.4
  +++ personal-schema.xml	2001/02/14 18:28:43	1.4.2.1
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<personnel xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
  +<personnel xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
   	   xsi:noNamespaceSchemaLocation='personal.xsd'>
   
     <person id="Big.Boss" >
  
  
  
  1.6.2.2   +35 -14    xml-xerces/java/data/personal.xsd
  
  Index: personal.xsd
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/data/personal.xsd,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- personal.xsd	2000/12/12 19:07:10	1.6.2.1
  +++ personal.xsd	2001/02/14 18:28:43	1.6.2.2
  @@ -1,25 +1,46 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<schema>
  +<schema xmlns='http://www.w3.org/2000/10/XMLSchema'>
   
    <element name="personnel">
     <complexType>
  -   <element ref="person" minOccurs='1' maxOccurs='unbounded'/>
  +   <sequence>
  +     <element ref="person" minOccurs='1' maxOccurs='unbounded'/>
  +   </sequence>
     </complexType>
  +
  +<!--  Identity constraints commented out for now...
  +  <unique>
  +   <selector xpath="person"/>
  +   <field xpath="@name"/>
  +  </unique>
  +  <key name='empid'>
  +   <selector xpath="person"/>
  +   <field xpath="@id"/>
  +  </key>
  +  <keyref name='empid'>
  +   <selector xpath="person"/> 
  +   <field xpath="link/@manager"/>  
  +  </keyref>
  +-->
  +
    </element>
   
    <element name="person">
     <complexType>
  -   <element ref="name"/>
  -   <element ref="email" minOccurs='0' maxOccurs='unbounded'/>
  -   <element ref="url"   minOccurs='0' maxOccurs='unbounded'/>
  -   <element ref="link"  minOccurs='0' maxOccurs='1'/>
  -
  +   <sequence>
  +     <element ref="name"/>
  +     <element ref="email" minOccurs='0' maxOccurs='unbounded'/>
  +     <element ref="url"   minOccurs='0' maxOccurs='unbounded'/>
  +     <element ref="link"  minOccurs='0' maxOccurs='1'/>
  +   </sequence>
      <attribute name="id"  type="ID" use='required'/>
      <attribute name="note" type="string"/>
  -   <attribute name="contr" type="NMTOKEN" use='default' value="false">
  -    <simpleType base="string">
  -     <enumeration value="true"/>
  -     <enumeration value="false"/>
  +   <attribute name="contr" use='default' value="false">
  +    <simpleType>
  +     <restriction base = "string">
  +       <enumeration value="true"/>
  +       <enumeration value="false"/>
  +     </restriction>
       </simpleType>
      </attribute>
      <attribute name="salary" type="integer"/>
  @@ -27,7 +48,7 @@
    </element>
   
    <element name="name">
  -  <complexType content='elementOnly'>
  +  <complexType>
      <all>
       <element ref="family"/>
       <element ref="given"/>
  @@ -42,13 +63,13 @@
    <element name="email" type='string'/>
   
    <element name="url">
  -  <complexType content="empty">
  +  <complexType>
      <attribute name="href" type="string" default="http://"/>
     </complexType>
    </element>
   
    <element name="link">
  -  <complexType content="empty">
  +  <complexType>
      <attribute name="manager" type="IDREF"/>
      <attribute name="subordinates" type="IDREFS"/>
     </complexType>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.2   +1 -0      xml-xerces/java/docs/docs-book.xml
  
  Index: docs-book.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/docs-book.xml,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- docs-book.xml	2000/12/12 19:07:11	1.5.2.1
  +++ docs-book.xml	2001/02/14 18:28:44	1.5.2.2
  @@ -7,6 +7,7 @@
     <separator/>
     <document id="index"       label="Readme"       source="readme.xml"      />
     <external href="http://xml.apache.org/dist/xerces-j/"  label="Download"/>
  +  <external href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/java/"  label="Repository"/>
     <document id="install"     label="Installation" source="install.xml"     />
   
     <separator/>
  
  
  
  1.16.2.5  +2 -11     xml-xerces/java/docs/releases.xml
  
  Index: releases.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/releases.xml,v
  retrieving revision 1.16.2.4
  retrieving revision 1.16.2.5
  diff -u -r1.16.2.4 -r1.16.2.5
  --- releases.xml	2001/01/26 07:12:50	1.16.2.4
  +++ releases.xml	2001/02/14 18:28:44	1.16.2.5
  @@ -6,16 +6,7 @@
           <ul>
              <li>Implemented basic support for XML Schema identity constraints [andyc]</li>
              <li>Updates to improve DFA build-time performance. [ATOZAWA@jp.ibm.com]</li>
  +           <li>Sync'ed with Xerces 1.3.0 [Arnaud  Le Hors]</li>
  +
           </ul>
  -    </s2>
  -    <s2 title='December 7, 2000'>
  -        <ul>
  -           <li>The all mighty Xerces 2.0.0 first alpha version</li>
  -           <li>Support all scanning and parsing functionalities available form Xerces 1</li>
  -           <li>Support SAX, SAX2, DOM L1 and DOM L2 apis</li>
  -           <li>Support full DTD Validation</li>
  -           <li>No support for Schema Validation yet</li>
  -           <li>Some documentation are not updated or verified</li>
  -        </ul>
  -    </s2>
   </s1>
  
  
  
  1.8.2.3   +45 -19    xml-xerces/java/docs/schema.xml
  
  Index: schema.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/schema.xml,v
  retrieving revision 1.8.2.2
  retrieving revision 1.8.2.3
  diff -u -r1.8.2.2 -r1.8.2.3
  --- schema.xml	2000/12/12 19:07:15	1.8.2.2
  +++ schema.xml	2001/02/14 18:28:45	1.8.2.3
  @@ -5,15 +5,17 @@
   		<p>!!! No Schema support in this release !!! This package contains an implementation of the W3C XML 
   		Schema language. This implementation is experimental. The 
   		<jump href="http://www.w3.org/XML/Group/Schemas.html">XML Schema</jump> 
  -		language is still in working draft stage: you 
  -		should not consider this implementation complete or correct. 
  +		language is in candidate recommendation stage: it is still
  +		possible that some changes in the specification could
  +		occur.  You should also not necessarily 
  +		consider this implementation complete or correct. 
   		The limitations of this implementation are detailed below. 
   		Please read this document before using this package.</p>
   	</s2>
   	<s2 title="Introduction">
   		<p>This package contains an implementation of a subset of the 
  -		W3C XML Schema Language as specified in the 7 April 2000
  -        Working Drafts for <jump
  +		W3C XML Schema Language as specified in the 24 October 2000
  +        Candidate Recommendations for <jump
           href="http://www.w3.org/TR/xmlschema-1/">Structures</jump> and
           <jump
           href="http://www.w3.org/TR/xmlschema-2/">Datatypes</jump>. The
  @@ -26,14 +28,14 @@
   		design and on representing an XML document&apos;s grammar 
   		as part of the document&apos;s DOM tree. We intend to update 
   		this package until it implements all of the functionality 
  -		of the then current XML Schema Working Draft. If you are 
  +		of the then current XML Schema Draft. If you are 
   		interested in a particular unimplemented feature, we welcome 
   		your feedback on the &javaparsername; mailing list.</p>
   	</s2>
   	<s2 title="Limitations">
   		<p>The XML Schema implementation in this package is a 
  -		subset of the features defined in the 7 April 2000 
  -		XML Schema Working Drafts.</p>
  +		subset of the features defined in the 24 October 2000 
  +		XML Schema Candidate Recommendations.</p>
   	</s2>
       <s2 title='Components Supported'>
           <ul>
  @@ -46,13 +48,16 @@
               <li>Complex type definitions</li>
               <li>Wildcards: any</li>
               <li>Wildcards: anyAttribute</li>
  +            <li>import and include</li>
  +            <li>Identity constraints: unique, key, keyref
  +			(experimental)</li>
           </ul>
       </s2>
       <s2 title='Components NOT Supported'>
           <ul>
  -            <li>Identity constraints: unique, key, keyref</li>
               <li>Notation declaration</li>
               <li>Annotation (ignored)</li>
  +            <li>Redefine</li>
           </ul>
       </s2>
       <s2 title='Features Supported'>
  @@ -62,9 +67,9 @@
               <li>Nested element declaration</li>
               <li>Separate symbol spaces for elements, types, groups, and
                   attribute groups</li>
  -            <li>Equivalency classes</li>
  +            <li>Substitution Groups</li>
               <li>Target namespace</li>
  -            <li>"xsi:schemaLocation" and "xsl:noNamespacesSchemaLocation"</li>
  +            <li>"xsi:schemaLocation" and "xsi:noNamespaceSchemaLocation"</li>
               <li>Include</li>
               <li>Import</li>
               <li>"xsi:type"</li>
  @@ -72,19 +77,22 @@
       </s2>
       <s2 title='Features NOT Supported'>
           <ul>
  -            <li>Constraints in Chapter 5</li>
  +            <li>Constraints in Chapter 5 and elsewhere in the
  +			specifications</li>
               <li>Nullable</li>
  -            <li>Block</li>
  -            <li>Abstract</li>
  +            <li>Block and final</li>
  +            <li>Abstract for both types and elements</li>
  +			<li>Fixed and default values of elements</li>
  +			<li>Attribute normalization</li>
           </ul>
       </s2>
       <s2 title='Datatypes Supported'>
           <ul>
               <li>Built-in simple types (primitive, derived)</li>
  -            <li>Simple type derivation (restriction, list)</li>
  +            <li>Simple type derivation (restriction, list, union)</li>
               <li>Regular expressions</li>
               <li>Binary (base64, hex)</li>
  -            <li>Constraining facets</li>
  +            <li>Constraining facets (except for whiteSpace)</li>
           </ul>
       </s2>
       <s2 title='Datatypes NOT Supported'>
  @@ -97,8 +105,26 @@
   		xsi:noNamespaceSchemaLocation attribute on the root 
   		element of the document. The xsi prefix must be bound to the 
   		Schema document instance namespace, as specified by the
  -		working draft specification. See the sample provided in the
  +		candidate recommendation specification. See the sample provided in the
   		Usage section.</p>
  +		<p>We also emphasize that support for schema ID constraints is
  +		highly experimental.  Some of the limitations of this support
  +		are:
  +		</p>
  +		<ul>
  +		<li>Very little error-checking has been performed.</li> 
  +		<li>Identity constraints will not work if the schema under
  +		consideration has a targetNamespace.</li>
  +		<li>The XPath expressions used for specifying selectors and
  +		fields are
  +		 a subset of XPath. Currently, only the self, child, and
  +		 attribute axes are supported.</li>
  +		 <li>Field values are currently compared in the lexical space. 
  +		 Therefore, the values "1" and "1.0" are NOT equal for a 
  +		 field of type "decimal" (even though they should be).</li>
  +		 </ul>
  +		 <p>Finally, note that in &lt;all&gt; model groups fewer than 8 elements must
  +		 be used.</p>
   	</s2>
   	<s2 title="Usage">
   		<p>In this release, schema validation has been integrated with the 
  @@ -108,16 +134,16 @@
   		grammar using an xsi:schemaLocation attribute attached to the root / top-level element 
   		in the document. Here is an example with no target namspace: </p>
   <source>&lt;document
  -  xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
  +  xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
     xsi:noNamespaceSchemaLocation='document.xsd'&gt;
   ...
   &lt;/document&gt;</source>
   		<p>Here is an example with a target namespace. Note that it is an
   		error to specify a different namespace than the target namespace
  -		defined in Schema.</p>
  +		defined in the Schema.</p>
   <source>&lt;document
     xmlns='NS'
  -  xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' 
  +  xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance' 
     xsi:schemaLocation='NS document.xsd'&gt;
   ...
   &lt;/document&gt;</source>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.4   +5 -1      xml-xerces/java/samples/dom/Attic/Writer.java
  
  Index: Writer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/samples/dom/Attic/Writer.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Writer.java	2001/01/05 10:04:56	1.1.2.3
  +++ Writer.java	2001/02/14 18:28:46	1.1.2.4
  @@ -77,7 +77,7 @@
    *
    * @author Andy Clark, IBM
    *
  - * @version $Id: Writer.java,v 1.1.2.3 2001/01/05 10:04:56 andyc Exp $
  + * @version $Id: Writer.java,v 1.1.2.4 2001/02/14 18:28:46 lehors Exp $
    */
   public class Writer {
   
  @@ -135,6 +135,10 @@
       /** Default constructor. */
       public Writer() {
       } // <init>()
  +
  +    public Writer(boolean canonical) {
  +        fCanonical = canonical;
  +    } // <init>(boolean)
   
       //
       // Public methods
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.7  +0 -1      xml-xerces/java/src/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/Makefile,v
  retrieving revision 1.25.2.6
  retrieving revision 1.25.2.7
  diff -u -r1.25.2.6 -r1.25.2.7
  --- Makefile	2000/12/12 19:07:30	1.25.2.6
  +++ Makefile	2001/02/14 18:28:47	1.25.2.7
  @@ -84,7 +84,6 @@
   	${MKDIR} ../class/org/apache/xerces/xni
   	${CP}  ../src/org/apache/xerces/xni/*.class		../class/org/apache/xerces/xni
   
  -
   #-src/org/apache/xml/serialize
   #	${MKDIR} ../class/org/apache/xml/serialize
   #	${CP}  ../src/org/apache/xml/serialize/*.class                  ../class/org/apache/xml/serialize
  
  
  
  1.30.2.5  +5 -0      xml-xerces/java/src/Makefile.incl
  
  Index: Makefile.incl
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/Makefile.incl,v
  retrieving revision 1.30.2.4
  retrieving revision 1.30.2.5
  diff -u -r1.30.2.4 -r1.30.2.5
  --- Makefile.incl	2000/12/07 21:33:00	1.30.2.4
  +++ Makefile.incl	2001/02/14 18:28:47	1.30.2.5
  @@ -18,6 +18,8 @@
   SB_CLPATH = $(STYLEBOOK_CLPATH)$(CLPATHSEP)$(CLASSPATH)
   
   JAR = jar
  +TAR = tar
  +GZIP = gzip
   JAVAC = javac
   ifeq ($(JDK12BIN),)
   JAVA12 = java
  @@ -69,6 +71,9 @@
   
   BINTARFILE = ${PRODUCTNAME}-J-bin.${PRODUCTVERSION_DOT}.tar
   SRCTARFILE = ${PRODUCTNAME}-J-src.${PRODUCTVERSION_DOT}.tar
  +
  +BINGZFILE = ${PRODUCTNAME}-J-bin.${PRODUCTVERSION_DOT}.tar.gz
  +SRCGZFILE = ${PRODUCTNAME}-J-src.${PRODUCTVERSION_DOT}.tar.gz
   
   BINJARFILE = ${PRODUCTNAME}-J-bin.${PRODUCTVERSION_DOT}.jar
   SRCJARFILE = ${PRODUCTNAME}-J-src.${PRODUCTVERSION_DOT}.jar
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.4.1   +196 -196  xml-xerces/java/src/org/apache/html/dom/HTMLAnchorElementImpl.java
  
  Index: HTMLAnchorElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLAnchorElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLAnchorElementImpl.java	2000/02/10 04:00:08	1.2
  +++ HTMLAnchorElementImpl.java	2001/02/14 18:28:48	1.2.4.1
  @@ -54,199 +54,199 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:08 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLAnchorElement
  - * @see ElementImpl
  - */
  -public final class HTMLAnchorElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLAnchorElement
  -{
  -    
  -    
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -    public String getCharset()
  -    {
  -        return getAttribute( "charset" );
  -    }
  -    
  -    
  -    public void setCharset( String charset )
  -    {
  -        setAttribute( "charset", charset );
  -    }
  -    
  -    
  -    public String getCoords()
  -    {
  -        return getAttribute( "coords" );
  -    }
  -    
  -    
  -    public void setCoords( String coords )
  -    {
  -        setAttribute( "coords", coords );
  -    }
  -  
  -  
  -    public String getHref()
  -    {
  -        return getAttribute( "href" );
  -    }
  -    
  -    
  -    public void setHref( String href )
  -    {
  -        setAttribute( "href", href );
  -    }
  -    
  -    
  -    public String getHreflang()
  -    {
  -        return getAttribute( "hreflang" );
  -    }
  -    
  -    
  -    public void setHreflang( String hreflang )
  -    {
  -        setAttribute( "hreflang", hreflang );
  -    }
  -  
  -  
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -    
  -    
  -    public String getRel()
  -    {
  -        return getAttribute( "rel" );
  -    }
  -    
  -    
  -    public void setRel( String rel )
  -    {
  -        setAttribute( "rel", rel );
  -    }
  -
  -    
  -    public String getRev()
  -    {
  -        return getAttribute( "rev" );
  -    }
  -    
  -    
  -    public void setRev( String rev )
  -    {
  -        setAttribute( "rev", rev );
  -    }
  -
  -
  -    public String getShape()
  -    {
  -        return capitalize( getAttribute( "shape" ) );
  -    }
  -    
  -    
  -    public void setShape( String shape )
  -    {
  -        setAttribute( "shape", shape );
  -    }
  -  
  -
  -    public int getTabIndex()
  -    {
  -        return this.getInteger( getAttribute( "tabindex" ) );
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -  
  -    public String getTarget()
  -    {
  -        return getAttribute( "target" );
  -    }
  -    
  -    
  -    public void setTarget( String target )
  -    {
  -        setAttribute( "target", target );
  -    }
  -    
  -    
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -
  -    
  -    public void blur()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    public void focus()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -  
  -  
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLAnchorElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:48 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLAnchorElement
  + * @see ElementImpl
  + */
  +public class HTMLAnchorElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLAnchorElement
  +{
  +    
  +    
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +    public String getCharset()
  +    {
  +        return getAttribute( "charset" );
  +    }
  +    
  +    
  +    public void setCharset( String charset )
  +    {
  +        setAttribute( "charset", charset );
  +    }
  +    
  +    
  +    public String getCoords()
  +    {
  +        return getAttribute( "coords" );
  +    }
  +    
  +    
  +    public void setCoords( String coords )
  +    {
  +        setAttribute( "coords", coords );
  +    }
  +  
  +  
  +    public String getHref()
  +    {
  +        return getAttribute( "href" );
  +    }
  +    
  +    
  +    public void setHref( String href )
  +    {
  +        setAttribute( "href", href );
  +    }
  +    
  +    
  +    public String getHreflang()
  +    {
  +        return getAttribute( "hreflang" );
  +    }
  +    
  +    
  +    public void setHreflang( String hreflang )
  +    {
  +        setAttribute( "hreflang", hreflang );
  +    }
  +  
  +  
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +    
  +    
  +    public String getRel()
  +    {
  +        return getAttribute( "rel" );
  +    }
  +    
  +    
  +    public void setRel( String rel )
  +    {
  +        setAttribute( "rel", rel );
  +    }
  +
  +    
  +    public String getRev()
  +    {
  +        return getAttribute( "rev" );
  +    }
  +    
  +    
  +    public void setRev( String rev )
  +    {
  +        setAttribute( "rev", rev );
  +    }
  +
  +
  +    public String getShape()
  +    {
  +        return capitalize( getAttribute( "shape" ) );
  +    }
  +    
  +    
  +    public void setShape( String shape )
  +    {
  +        setAttribute( "shape", shape );
  +    }
  +  
  +
  +    public int getTabIndex()
  +    {
  +        return this.getInteger( getAttribute( "tabindex" ) );
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +  
  +    public String getTarget()
  +    {
  +        return getAttribute( "target" );
  +    }
  +    
  +    
  +    public void setTarget( String target )
  +    {
  +        setAttribute( "target", target );
  +    }
  +    
  +    
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +
  +    
  +    public void blur()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    public void focus()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +  
  +  
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLAnchorElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +163 -163  xml-xerces/java/src/org/apache/html/dom/HTMLAppletElementImpl.java
  
  Index: HTMLAppletElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLAppletElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLAppletElementImpl.java	2000/02/10 04:00:08	1.2
  +++ HTMLAppletElementImpl.java	2001/02/14 18:28:48	1.2.4.1
  @@ -54,166 +54,166 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:08 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLAppletElement
  - * @see HTMLElementImpl
  - */
  -public final class HTMLAppletElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLAppletElement
  -{
  -
  -    
  -    public String getAlign()
  -    {
  -        return getAttribute( "align" );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -  
  -    public String getAlt()
  -    {
  -        return getAttribute( "alt" );
  -    }
  -    
  -    
  -    public void setAlt( String alt )
  -    {
  -        setAttribute( "alt", alt );
  -    }
  -
  -    
  -    public String getArchive()
  -    {
  -        return getAttribute( "archive" );
  -    }
  -    
  -    
  -    public void setArchive( String archive )
  -    {
  -        setAttribute( "archive", archive );
  -    }
  -
  -
  -    public String getCode()
  -    {
  -        return getAttribute( "code" );
  -    }
  -    
  -    
  -    public void setCode( String code )
  -    {
  -        setAttribute( "code", code );
  -    }
  -
  -
  -    public String getCodeBase()
  -    {
  -        return getAttribute( "codebase" );
  -    }
  -    
  -    
  -    public void setCodeBase( String codeBase )
  -    {
  -        setAttribute( "codebase", codeBase );
  -    }
  -
  -
  -    public String getHeight()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHeight( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -
  -
  -    public String getHspace()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHspace( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -
  -
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -
  -    public String getObject()
  -    {
  -        return getAttribute( "object" );
  -    }
  -    
  -    
  -    public void setObject( String object )
  -    {
  -        setAttribute( "object", object );
  -    }
  -
  -
  -    public String getVspace()
  -    {
  -        return getAttribute( "vspace" );
  -    }
  -    
  -    
  -    public void setVspace( String vspace )
  -    {
  -        setAttribute( "vspace", vspace );
  -    }
  -
  -
  -    public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLAppletElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -    
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:48 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLAppletElement
  + * @see HTMLElementImpl
  + */
  +public class HTMLAppletElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLAppletElement
  +{
  +
  +    
  +    public String getAlign()
  +    {
  +        return getAttribute( "align" );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +  
  +    public String getAlt()
  +    {
  +        return getAttribute( "alt" );
  +    }
  +    
  +    
  +    public void setAlt( String alt )
  +    {
  +        setAttribute( "alt", alt );
  +    }
  +
  +    
  +    public String getArchive()
  +    {
  +        return getAttribute( "archive" );
  +    }
  +    
  +    
  +    public void setArchive( String archive )
  +    {
  +        setAttribute( "archive", archive );
  +    }
  +
  +
  +    public String getCode()
  +    {
  +        return getAttribute( "code" );
  +    }
  +    
  +    
  +    public void setCode( String code )
  +    {
  +        setAttribute( "code", code );
  +    }
  +
  +
  +    public String getCodeBase()
  +    {
  +        return getAttribute( "codebase" );
  +    }
  +    
  +    
  +    public void setCodeBase( String codeBase )
  +    {
  +        setAttribute( "codebase", codeBase );
  +    }
  +
  +
  +    public String getHeight()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHeight( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +
  +
  +    public String getHspace()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHspace( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +
  +
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +
  +    public String getObject()
  +    {
  +        return getAttribute( "object" );
  +    }
  +    
  +    
  +    public void setObject( String object )
  +    {
  +        setAttribute( "object", object );
  +    }
  +
  +
  +    public String getVspace()
  +    {
  +        return getAttribute( "vspace" );
  +    }
  +    
  +    
  +    public void setVspace( String vspace )
  +    {
  +        setAttribute( "vspace", vspace );
  +    }
  +
  +
  +    public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLAppletElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +    
  +}
  +
  
  
  
  1.2.4.1   +135 -135  xml-xerces/java/src/org/apache/html/dom/HTMLAreaElementImpl.java
  
  Index: HTMLAreaElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLAreaElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLAreaElementImpl.java	2000/02/10 04:00:08	1.2
  +++ HTMLAreaElementImpl.java	2001/02/14 18:28:48	1.2.4.1
  @@ -54,138 +54,138 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:08 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLAreaElement
  - * @see ElementImpl
  - */
  -public final class HTMLAreaElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLAreaElement
  -{
  -    
  -    
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -    public String getAlt()
  -    {
  -        return getAttribute( "alt" );
  -    }
  -    
  -    
  -    public void setAlt( String alt )
  -    {
  -        setAttribute( "alt", alt );
  -    }
  -    
  -    public String getCoords()
  -    {
  -        return getAttribute( "coords" );
  -    }
  -    
  -    
  -    public void setCoords( String coords )
  -    {
  -        setAttribute( "coords", coords );
  -    }
  -  
  -  
  -    public String getHref()
  -    {
  -        return getAttribute( "href" );
  -    }
  -    
  -    
  -    public void setHref( String href )
  -    {
  -        setAttribute( "href", href );
  -    }
  -
  -    
  -    public boolean getNoHref()
  -    {
  -        return getBinary( "href" );
  -    }
  -    
  -    
  -    public void setNoHref( boolean noHref )
  -    {
  -        setAttribute( "nohref", noHref );
  -    }
  -    
  -    
  -    public String getShape()
  -    {
  -        return capitalize( getAttribute( "shape" ) );
  -    }
  -    
  -    
  -    public void setShape( String shape )
  -    {
  -        setAttribute( "shape", shape );
  -    }
  -
  -    
  -    public int getTabIndex()
  -    {
  -        return getInteger( getAttribute( "tabindex" ) );
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -    
  -    public String getTarget()
  -    {
  -        return getAttribute( "target" );
  -    }
  -    
  -    
  -    public void setTarget( String target )
  -    {
  -        setAttribute( "target", target );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLAreaElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -    
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:48 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLAreaElement
  + * @see ElementImpl
  + */
  +public class HTMLAreaElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLAreaElement
  +{
  +    
  +    
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +    public String getAlt()
  +    {
  +        return getAttribute( "alt" );
  +    }
  +    
  +    
  +    public void setAlt( String alt )
  +    {
  +        setAttribute( "alt", alt );
  +    }
  +    
  +    public String getCoords()
  +    {
  +        return getAttribute( "coords" );
  +    }
  +    
  +    
  +    public void setCoords( String coords )
  +    {
  +        setAttribute( "coords", coords );
  +    }
  +  
  +  
  +    public String getHref()
  +    {
  +        return getAttribute( "href" );
  +    }
  +    
  +    
  +    public void setHref( String href )
  +    {
  +        setAttribute( "href", href );
  +    }
  +
  +    
  +    public boolean getNoHref()
  +    {
  +        return getBinary( "href" );
  +    }
  +    
  +    
  +    public void setNoHref( boolean noHref )
  +    {
  +        setAttribute( "nohref", noHref );
  +    }
  +    
  +    
  +    public String getShape()
  +    {
  +        return capitalize( getAttribute( "shape" ) );
  +    }
  +    
  +    
  +    public void setShape( String shape )
  +    {
  +        setAttribute( "shape", shape );
  +    }
  +
  +    
  +    public int getTabIndex()
  +    {
  +        return getInteger( getAttribute( "tabindex" ) );
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +    
  +    public String getTarget()
  +    {
  +        return getAttribute( "target" );
  +    }
  +    
  +    
  +    public void setTarget( String target )
  +    {
  +        setAttribute( "target", target );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLAreaElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +    
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLBRElementImpl.java
  
  Index: HTMLBRElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLBRElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLBRElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLBRElementImpl.java	2001/02/14 18:28:49	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLBRElement
  - * @see ElementImpl
  - */
  -public final class HTMLBRElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLBRElement
  -{
  -
  -    
  -    public String getClear()
  -    {
  -        return capitalize( getAttribute( "clear" ) );
  -    }
  -    
  -    
  -    public void setClear( String clear )
  -    {
  -        setAttribute( "clear", clear );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLBRElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:49 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLBRElement
  + * @see ElementImpl
  + */
  +public class HTMLBRElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLBRElement
  +{
  +
  +    
  +    public String getClear()
  +    {
  +        return capitalize( getAttribute( "clear" ) );
  +    }
  +    
  +    
  +    public void setClear( String clear )
  +    {
  +        setAttribute( "clear", clear );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLBRElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +55 -55    xml-xerces/java/src/org/apache/html/dom/HTMLBaseElementImpl.java
  
  Index: HTMLBaseElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLBaseElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLBaseElementImpl.java	2000/02/10 04:00:08	1.2
  +++ HTMLBaseElementImpl.java	2001/02/14 18:28:49	1.2.4.1
  @@ -54,58 +54,58 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:08 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLBaseElement
  - * @see ElementImpl
  - */
  -public final class HTMLBaseElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLBaseElement
  -{
  -
  -    
  -    public String getHref()
  -    {
  -        return getAttribute( "href" );
  -    }
  -    
  -    
  -    public void setHref( String href )
  -    {
  -        setAttribute( "href", href );
  -    }
  -    
  -    public String getTarget()
  -    {
  -        return getAttribute( "target" );
  -    }
  -    
  -    
  -    public void setTarget( String target )
  -    {
  -        setAttribute( "target", target );
  -    }
  -
  -
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLBaseElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:49 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLBaseElement
  + * @see ElementImpl
  + */
  +public class HTMLBaseElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLBaseElement
  +{
  +
  +    
  +    public String getHref()
  +    {
  +        return getAttribute( "href" );
  +    }
  +    
  +    
  +    public void setHref( String href )
  +    {
  +        setAttribute( "href", href );
  +    }
  +    
  +    public String getTarget()
  +    {
  +        return getAttribute( "target" );
  +    }
  +    
  +    
  +    public void setTarget( String target )
  +    {
  +        setAttribute( "target", target );
  +    }
  +
  +
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLBaseElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +68 -68    xml-xerces/java/src/org/apache/html/dom/HTMLBaseFontElementImpl.java
  
  Index: HTMLBaseFontElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLBaseFontElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLBaseFontElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLBaseFontElementImpl.java	2001/02/14 18:28:49	1.2.4.1
  @@ -54,71 +54,71 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLBaseFontElement
  - * @see ElementImpl
  - */
  -public final class HTMLBaseFontElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLBaseFontElement
  -{
  -    
  -    
  -    public String getColor()
  -    {
  -        return capitalize( getAttribute( "color" ) );
  -    }
  -    
  -    
  -    public void setColor( String color )
  -    {
  -        setAttribute( "color", color );
  -    }
  -    
  -    
  -    public String getFace()
  -    {
  -        return capitalize( getAttribute( "face" ) );
  -    }
  -    
  -    
  -    public void setFace( String face )
  -    {
  -        setAttribute( "face", face );
  -    }
  -    
  -    
  -    public String getSize()
  -    {
  -        return getAttribute( "size" );
  -    }
  -    
  -    
  -    public void setSize( String size )
  -    {
  -        setAttribute( "size", size );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLBaseFontElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:49 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLBaseFontElement
  + * @see ElementImpl
  + */
  +public class HTMLBaseFontElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLBaseFontElement
  +{
  +    
  +    
  +    public String getColor()
  +    {
  +        return capitalize( getAttribute( "color" ) );
  +    }
  +    
  +    
  +    public void setColor( String color )
  +    {
  +        setAttribute( "color", color );
  +    }
  +    
  +    
  +    public String getFace()
  +    {
  +        return capitalize( getAttribute( "face" ) );
  +    }
  +    
  +    
  +    public void setFace( String face )
  +    {
  +        setAttribute( "face", face );
  +    }
  +    
  +    
  +    public String getSize()
  +    {
  +        return getAttribute( "size" );
  +    }
  +    
  +    
  +    public void setSize( String size )
  +    {
  +        setAttribute( "size", size );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLBaseFontElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +103 -103  xml-xerces/java/src/org/apache/html/dom/HTMLBodyElementImpl.java
  
  Index: HTMLBodyElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLBodyElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLBodyElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLBodyElementImpl.java	2001/02/14 18:28:49	1.2.4.1
  @@ -54,106 +54,106 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLBodyElement
  - * @see ElementImpl
  - */
  -public final class HTMLBodyElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLBodyElement
  -{
  -    
  -    public String getALink()
  -    {
  -        return getAttribute( "alink" );
  -    }
  -
  -    
  -    public void setALink(String aLink)
  -    {
  -        setAttribute( "alink", aLink );
  -    }
  -    
  -  
  -    public String getBackground()
  -    {
  -        return getAttribute( "background" );
  -    }
  -    
  -  
  -    public void setBackground( String background )
  -    {
  -        setAttribute( "background", background );
  -    }
  -    
  -  
  -    public String getBgColor()
  -    {
  -        return getAttribute( "bgcolor" );
  -    }
  -    
  -    
  -    public void setBgColor(String bgColor)
  -    {
  -        setAttribute( "bgcolor", bgColor );
  -    }
  -    
  -  
  -    public String getLink()
  -    {
  -        return getAttribute( "link" );
  -    }
  -  
  -    
  -    public void setLink(String link)
  -    {
  -        setAttribute( "link", link );
  -    }
  -    
  -  
  -    public String getText()
  -    {
  -        return getAttribute( "text" );
  -    }
  -    
  -  
  -    public void setText(String text)
  -    {
  -        setAttribute( "text", text );
  -    }
  -    
  -  
  -    public String getVLink()
  -    {
  -        return getAttribute( "vlink" );
  -    }
  -  
  -    
  -    public void  setVLink(String vLink)
  -    {
  -        setAttribute( "vlink", vLink );
  -    }
  -  
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLBodyElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:49 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLBodyElement
  + * @see ElementImpl
  + */
  +public class HTMLBodyElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLBodyElement
  +{
  +    
  +    public String getALink()
  +    {
  +        return getAttribute( "alink" );
  +    }
  +
  +    
  +    public void setALink(String aLink)
  +    {
  +        setAttribute( "alink", aLink );
  +    }
  +    
  +  
  +    public String getBackground()
  +    {
  +        return getAttribute( "background" );
  +    }
  +    
  +  
  +    public void setBackground( String background )
  +    {
  +        setAttribute( "background", background );
  +    }
  +    
  +  
  +    public String getBgColor()
  +    {
  +        return getAttribute( "bgcolor" );
  +    }
  +    
  +    
  +    public void setBgColor(String bgColor)
  +    {
  +        setAttribute( "bgcolor", bgColor );
  +    }
  +    
  +  
  +    public String getLink()
  +    {
  +        return getAttribute( "link" );
  +    }
  +  
  +    
  +    public void setLink(String link)
  +    {
  +        setAttribute( "link", link );
  +    }
  +    
  +  
  +    public String getText()
  +    {
  +        return getAttribute( "text" );
  +    }
  +    
  +  
  +    public void setText(String text)
  +    {
  +        setAttribute( "text", text );
  +    }
  +    
  +  
  +    public String getVLink()
  +    {
  +        return getAttribute( "vlink" );
  +    }
  +  
  +    
  +    public void  setVLink(String vLink)
  +    {
  +        setAttribute( "vlink", vLink );
  +    }
  +  
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLBodyElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.3.4.1   +220 -220  xml-xerces/java/src/org/apache/html/dom/HTMLBuilder.java
  
  Index: HTMLBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- HTMLBuilder.java	2000/02/10 04:00:09	1.3
  +++ HTMLBuilder.java	2001/02/14 18:28:49	1.3.4.1
  @@ -54,223 +54,223 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import java.util.Vector;
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -import org.xml.sax.*;
  -import org.apache.xerces.dom.TextImpl;
  -import org.apache.xerces.dom.ElementImpl;
  -import org.apache.xerces.dom.ProcessingInstructionImpl;
  -
  -
  -/**
  - * This is a SAX document handler that is used to build an HTML document.
  - * It can build a document from any SAX parser, but is specifically tuned
  - * for working with the OpenXML HTML parser.
  - * 
  - * 
  - * @version $Revision: 1.3 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
  - */
  -public class HTMLBuilder
  -    implements DocumentHandler
  -{
  -
  -
  -    /**
  -     * The document that is being built.
  -     */
  -    protected HTMLDocumentImpl    _document;
  -    
  -    
  -    /**
  -     * The current node in the document into which elements, text and
  -     * other nodes will be inserted. This starts as the document iself
  -     * and reflects each element that is currently being parsed.
  -     */
  -    protected ElementImpl        _current;
  -    
  -    /**
  -     * A reference to the current locator, this is generally the parser
  -     * itself. The locator is used to locate errors and identify the
  -     * source locations of elements.
  -     */
  -    private Locator         _locator;
  -
  -
  -    /**
  -     * Applies only to whitespace appearing between element tags in element content,
  -     * as per the SAX definition, and true by default.
  -     */
  -    private boolean         _ignoreWhitespace = true;
  -
  -
  -    /**
  -     * Indicates whether finished building a document. If so, can start building
  -     * another document. Must be initially true to get the first document processed.
  -     */
  -    private boolean         _done = true;
  -
  -
  -    /**    
  -     * The document is only created the same time as the document element, however, certain
  -     * nodes may precede the document element (comment and PI), and they are accumulated
  -     * in this vector.
  -     */
  -    protected Vector         _preRootNodes;
  -
  -    
  -    public void startDocument()
  -        throws SAXException
  -    {
  -        if ( ! _done )
  -	    throw new SAXException( "HTM001 State error: startDocument fired twice on one builder." );
  -	_document = null;
  -	_done = false;
  -    }
  -
  -
  -    public void endDocument()
  -        throws SAXException
  -    {
  -        if ( _document == null )
  -            throw new SAXException( "HTM002 State error: document never started or missing document element." );
  -	if ( _current != null )
  -	    throw new SAXException( "HTM003 State error: document ended before end of document element." );
  -        _current = null;
  -	_done = true;
  -    }
  -
  -
  -    public synchronized void startElement( String tagName, AttributeList attrList )
  -        throws SAXException
  -    {
  -        ElementImpl elem;
  -        int         i;
  -        
  -	if ( tagName == null )
  -	    throw new SAXException( "HTM004 Argument 'tagName' is null." );
  -
  -	// If this is the root element, this is the time to create a new document,
  -	// because only know we know the document element name and namespace URI.
  -	if ( _document == null )
  -	{
  -	    // No need to create the element explicitly.
  -	    _document = new HTMLDocumentImpl();
  -	    elem = (ElementImpl) _document.getDocumentElement();
  -	    _current = elem;
  -	    if ( _current == null )
  -		throw new SAXException( "HTM005 State error: Document.getDocumentElement returns null." );
  -
  -	    // Insert nodes (comment and PI) that appear before the root element.
  -	    if ( _preRootNodes != null )
  -	    {
  -		for ( i = _preRootNodes.size() ; i-- > 0 ; )
  -		    _document.insertBefore( (Node) _preRootNodes.elementAt( i ), elem );
  -		_preRootNodes = null;
  -	    }
  -	     
  -	}
  -	else
  -	{
  -	    // This is a state error, indicates that document has been parsed in full,
  -	    // or that there are two root elements.
  -	    if ( _current == null )
  -		throw new SAXException( "HTM006 State error: startElement called after end of document element." );
  -	    elem = (ElementImpl) _document.createElement( tagName );
  -	    _current.appendChild( elem );
  -	    _current = elem;
  -	}
  -
  -	// Add the attributes (specified and not-specified) to this element.
  -        if ( attrList != null )
  -        {
  -            for ( i = 0 ; i < attrList.getLength() ; ++ i )
  -                elem.setAttribute( attrList.getName( i ), attrList.getValue( i ) );
  -        }
  -    }
  -
  -    
  -    public void endElement( String tagName )
  -        throws SAXException
  -    {
  -
  -        if ( _current == null )
  -            throw new SAXException( "HTM007 State error: endElement called with no current node." );
  -	if ( ! _current.getNodeName().equals( tagName ) )
  -	    throw new SAXException( "HTM008 State error: mismatch in closing tag name " + tagName + "\n" + tagName);
  -
  -	// Move up to the parent element. When you reach the top (closing the root element).
  -	// the parent is document and current is null.
  -	if ( _current.getParentNode() == _current.getOwnerDocument() )
  -	    _current = null;
  -	else
  -	    _current = (ElementImpl) _current.getParentNode();
  -    }
  -
  -
  -    public void characters( String text )
  -        throws SAXException
  -    {
  -	if ( _current == null )
  -            throw new SAXException( "HTM009 State error: character data found outside of root element." );
  -	_current.appendChild( new TextImpl( _document, text ) );
  -    }
  -
  -    
  -    public void characters( char[] text, int start, int length )
  -        throws SAXException
  -    {
  -	if ( _current == null )
  -            throw new SAXException( "HTM010 State error: character data found outside of root element." );
  -	_current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
  -    }
  -    
  -    
  -    public void ignorableWhitespace( char[] text, int start, int length )
  -        throws SAXException
  -    {
  -        Node    node;
  -        
  -        if ( ! _ignoreWhitespace )
  -	    _current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
  -     }
  -    
  -    
  -    public void processingInstruction( String target, String instruction )
  -        throws SAXException
  -    {
  -        Node    node;
  -        
  -	// Processing instruction may appear before the document element (in fact, before the
  -	// document has been created, or after the document element has been closed.
  -        if ( _current == null && _document == null )
  -	{
  -	    if ( _preRootNodes == null )
  -		_preRootNodes = new Vector();
  -	    _preRootNodes.addElement( new ProcessingInstructionImpl( null, target, instruction ) );
  -	}
  -	else
  -        if ( _current == null && _document != null )
  -	    _document.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
  -	else
  -	    _current.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
  -    }
  -    
  -    
  -    public HTMLDocument getHTMLDocument()
  -    {
  -        return (HTMLDocument) _document;
  -    }
  -
  -    
  -    public void setDocumentLocator( Locator locator )
  -    {
  -        _locator = locator;
  -    }
  -
  -
  -}
  +package org.apache.html.dom;
  +
  +
  +import java.util.Vector;
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +import org.xml.sax.*;
  +import org.apache.xerces.dom.TextImpl;
  +import org.apache.xerces.dom.ElementImpl;
  +import org.apache.xerces.dom.ProcessingInstructionImpl;
  +
  +
  +/**
  + * This is a SAX document handler that is used to build an HTML document.
  + * It can build a document from any SAX parser, but is specifically tuned
  + * for working with the OpenXML HTML parser.
  + * 
  + * 
  + * @version $Revision: 1.3.4.1 $ $Date: 2001/02/14 18:28:49 $
  + * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
  + */
  +public class HTMLBuilder
  +    implements DocumentHandler
  +{
  +
  +
  +    /**
  +     * The document that is being built.
  +     */
  +    protected HTMLDocumentImpl    _document;
  +    
  +    
  +    /**
  +     * The current node in the document into which elements, text and
  +     * other nodes will be inserted. This starts as the document iself
  +     * and reflects each element that is currently being parsed.
  +     */
  +    protected ElementImpl        _current;
  +    
  +    /**
  +     * A reference to the current locator, this is generally the parser
  +     * itself. The locator is used to locate errors and identify the
  +     * source locations of elements.
  +     */
  +    private Locator         _locator;
  +
  +
  +    /**
  +     * Applies only to whitespace appearing between element tags in element content,
  +     * as per the SAX definition, and true by default.
  +     */
  +    private boolean         _ignoreWhitespace = true;
  +
  +
  +    /**
  +     * Indicates whether finished building a document. If so, can start building
  +     * another document. Must be initially true to get the first document processed.
  +     */
  +    private boolean         _done = true;
  +
  +
  +    /**    
  +     * The document is only created the same time as the document element, however, certain
  +     * nodes may precede the document element (comment and PI), and they are accumulated
  +     * in this vector.
  +     */
  +    protected Vector         _preRootNodes;
  +
  +    
  +    public void startDocument()
  +        throws SAXException
  +    {
  +        if ( ! _done )
  +	    throw new SAXException( "HTM001 State error: startDocument fired twice on one builder." );
  +	_document = null;
  +	_done = false;
  +    }
  +
  +
  +    public void endDocument()
  +        throws SAXException
  +    {
  +        if ( _document == null )
  +            throw new SAXException( "HTM002 State error: document never started or missing document element." );
  +	if ( _current != null )
  +	    throw new SAXException( "HTM003 State error: document ended before end of document element." );
  +        _current = null;
  +	_done = true;
  +    }
  +
  +
  +    public synchronized void startElement( String tagName, AttributeList attrList )
  +        throws SAXException
  +    {
  +        ElementImpl elem;
  +        int         i;
  +        
  +	if ( tagName == null )
  +	    throw new SAXException( "HTM004 Argument 'tagName' is null." );
  +
  +	// If this is the root element, this is the time to create a new document,
  +	// because only know we know the document element name and namespace URI.
  +	if ( _document == null )
  +	{
  +	    // No need to create the element explicitly.
  +	    _document = new HTMLDocumentImpl();
  +	    elem = (ElementImpl) _document.getDocumentElement();
  +	    _current = elem;
  +	    if ( _current == null )
  +		throw new SAXException( "HTM005 State error: Document.getDocumentElement returns null." );
  +
  +	    // Insert nodes (comment and PI) that appear before the root element.
  +	    if ( _preRootNodes != null )
  +	    {
  +		for ( i = _preRootNodes.size() ; i-- > 0 ; )
  +		    _document.insertBefore( (Node) _preRootNodes.elementAt( i ), elem );
  +		_preRootNodes = null;
  +	    }
  +	     
  +	}
  +	else
  +	{
  +	    // This is a state error, indicates that document has been parsed in full,
  +	    // or that there are two root elements.
  +	    if ( _current == null )
  +		throw new SAXException( "HTM006 State error: startElement called after end of document element." );
  +	    elem = (ElementImpl) _document.createElement( tagName );
  +	    _current.appendChild( elem );
  +	    _current = elem;
  +	}
  +
  +	// Add the attributes (specified and not-specified) to this element.
  +        if ( attrList != null )
  +        {
  +            for ( i = 0 ; i < attrList.getLength() ; ++ i )
  +                elem.setAttribute( attrList.getName( i ), attrList.getValue( i ) );
  +        }
  +    }
  +
  +    
  +    public void endElement( String tagName )
  +        throws SAXException
  +    {
  +
  +        if ( _current == null )
  +            throw new SAXException( "HTM007 State error: endElement called with no current node." );
  +	if ( ! _current.getNodeName().equals( tagName ) )
  +	    throw new SAXException( "HTM008 State error: mismatch in closing tag name " + tagName + "\n" + tagName);
  +
  +	// Move up to the parent element. When you reach the top (closing the root element).
  +	// the parent is document and current is null.
  +	if ( _current.getParentNode() == _current.getOwnerDocument() )
  +	    _current = null;
  +	else
  +	    _current = (ElementImpl) _current.getParentNode();
  +    }
  +
  +
  +    public void characters( String text )
  +        throws SAXException
  +    {
  +	if ( _current == null )
  +            throw new SAXException( "HTM009 State error: character data found outside of root element." );
  +	_current.appendChild( new TextImpl( _document, text ) );
  +    }
  +
  +    
  +    public void characters( char[] text, int start, int length )
  +        throws SAXException
  +    {
  +	if ( _current == null )
  +            throw new SAXException( "HTM010 State error: character data found outside of root element." );
  +	_current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
  +    }
  +    
  +    
  +    public void ignorableWhitespace( char[] text, int start, int length )
  +        throws SAXException
  +    {
  +        Node    node;
  +        
  +        if ( ! _ignoreWhitespace )
  +	    _current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
  +     }
  +    
  +    
  +    public void processingInstruction( String target, String instruction )
  +        throws SAXException
  +    {
  +        Node    node;
  +        
  +	// Processing instruction may appear before the document element (in fact, before the
  +	// document has been created, or after the document element has been closed.
  +        if ( _current == null && _document == null )
  +	{
  +	    if ( _preRootNodes == null )
  +		_preRootNodes = new Vector();
  +	    _preRootNodes.addElement( new ProcessingInstructionImpl( null, target, instruction ) );
  +	}
  +	else
  +        if ( _current == null && _document != null )
  +	    _document.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
  +	else
  +	    _current.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
  +    }
  +    
  +    
  +    public HTMLDocument getHTMLDocument()
  +    {
  +        return (HTMLDocument) _document;
  +    }
  +
  +    
  +    public void setDocumentLocator( Locator locator )
  +    {
  +        _locator = locator;
  +    }
  +
  +
  +}
  
  
  
  1.2.4.1   +114 -114  xml-xerces/java/src/org/apache/html/dom/HTMLButtonElementImpl.java
  
  Index: HTMLButtonElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLButtonElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLButtonElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLButtonElementImpl.java	2001/02/14 18:28:50	1.2.4.1
  @@ -54,117 +54,117 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLButtonElement
  - * @see ElementImpl
  - */
  -public final class HTMLButtonElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLButtonElement, HTMLFormControl
  -{
  -
  -    
  -      public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public int getTabIndex()
  -    {
  -        try
  -        {
  -            return Integer.parseInt( getAttribute( "tabindex" ) );
  -        }
  -        catch ( NumberFormatException except )
  -        {
  -            return 0;
  -        }
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -    
  -    public String getType()
  -    {
  -        return capitalize( getAttribute( "type" ) );
  -    }
  -
  -    
  -      public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLButtonElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:50 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLButtonElement
  + * @see ElementImpl
  + */
  +public class HTMLButtonElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLButtonElement, HTMLFormControl
  +{
  +
  +    
  +      public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public int getTabIndex()
  +    {
  +        try
  +        {
  +            return Integer.parseInt( getAttribute( "tabindex" ) );
  +        }
  +        catch ( NumberFormatException except )
  +        {
  +            return 0;
  +        }
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +    
  +    public String getType()
  +    {
  +        return capitalize( getAttribute( "type" ) );
  +    }
  +
  +    
  +      public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLButtonElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +  
  +}
  +
  
  
  
  1.4.4.1   +504 -504  xml-xerces/java/src/org/apache/html/dom/HTMLCollectionImpl.java
  
  Index: HTMLCollectionImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLCollectionImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -r1.4 -r1.4.4.1
  --- HTMLCollectionImpl.java	2000/02/16 00:45:44	1.4
  +++ HTMLCollectionImpl.java	2001/02/14 18:28:50	1.4.4.1
  @@ -54,507 +54,507 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * Implements {@link org.w3c.dom.html.HTMLCollection} to traverse any named
  - * elements on a {@link org.w3c.dom.html.HTMLDocument}. The elements type to
  - * look for is identified in the constructor by code. This collection is not
  - * optimized for traversing large trees.
  - * <p>
  - * The collection has to meet two requirements: it has to be live, and it has
  - * to traverse depth first and always return results in that order. As such,
  - * using an object container (such as {@link java.util.Vector}) is expensive on
  - * insert/remove operations. Instead, the collection has been implemented using
  - * three traversing functions. As a result, operations on large documents will
  - * result in traversal of the entire document tree and consume a considerable
  - * amount of time.
  - * <p>
  - * Note that synchronization on the traversed document cannot be achieved.
  - * The document itself cannot be locked, and locking each traversed node is
  - * likely to lead to a dead lock condition. Therefore, there is a chance of the
  - * document being changed as results are fetched; in all likelihood, the results
  - * might be out dated, but not erroneous.
  - * 
  - * 
  - * @version $Revision: 1.4 $ $Date: 2000/02/16 00:45:44 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLCollection
  - */
  -final class HTMLCollectionImpl
  -    implements HTMLCollection
  -{
  -    
  -
  -    /**
  -     * Request collection of all anchors in document: &lt;A&gt; elements that
  -     * have a <code>name</code> attribute.
  -     */
  -    static final short        ANCHOR = 1;
  -    
  -    
  -    /**
  -     * Request collection of all forms in document: &lt;FORM&gt; elements.
  -     */
  -    static final short        FORM = 2;
  -    
  -    
  -    /**
  -     * Request collection of all images in document: &lt;IMAGE&gt; elements.
  -     */
  -    static final short        IMAGE = 3;
  -    
  -    
  -    /**
  -     * Request collection of all Applets in document: &lt;APPLET&gt; and
  -     * &lt;OBJECT&gt; elements (&lt;OBJECT&gt; must contain an Applet).
  -     */
  -    static final short        APPLET = 4;
  -    
  -    
  -    /**
  -     * Request collection of all links in document: &lt;A&gt; and &lt;AREA&gt;
  -     * elements (must have a <code>href</code> attribute).
  -     */
  -    static final short        LINK = 5;
  -    
  -    
  -    /**
  -     * Request collection of all options in selection: &lt;OPTION&gt; elments in
  -     * &lt;SELECT&gt; or &lt;OPTGROUP&gt;.
  -     */
  -    static final short        OPTION = 6;
  -    
  -    
  -    /**
  -     * Request collection of all rows in table: &lt;TR&gt; elements in table or
  -     * table section.
  -     */
  -    static final short        ROW = 7;
  -
  -    
  -    /**
  -     * Request collection of all form elements: &lt;INPUT&gt;, &lt;BUTTON&gt;,
  -     * &lt;SELECT&gt;, &lt;TEXT&gt; and &lt;TEXTAREA&gt; elements inside form
  -     * &lt;FORM&gt;.
  -     */
  -    static final short        ELEMENT = 8;
  -    
  -    
  -    /**
  -     * Request collection of all areas in map: &lt;AREA&gt; element in &lt;MAP&gt;
  -     * (non recursive).
  -     */
  -    static final short        AREA = -1;
  -    
  -
  -    /**
  -     * Request collection of all table bodies in table: &lt;TBODY&gt; element in
  -     * table &lt;TABLE&gt; (non recursive).
  -     */
  -    static final short        TBODY = -2;
  -
  -    
  -    /**
  -     * Request collection of all cells in row: &lt;TD&gt; elements in &lt;TR&gt;
  -     * (non recursive).
  -     */
  -    static final short        CELL = -3;
  -
  -    
  -    /**
  -     * Indicates what this collection is looking for. Holds one of the enumerated
  -     * values and used by {@link #collectionMatch}. Set by the constructor and
  -     * determine the collection's use for its life time.
  -     */
  -    private short            _lookingFor;
  -    
  -    
  -    /**
  -     * This is the top level element underneath which the collection exists.
  -     */
  -    private Element            _topLevel;
  -
  -
  -    /**
  -     * Construct a new collection that retrieves element of the specific type
  -     * (<code>lookingFor</code>) from the specific document portion
  -     * (<code>topLevel</code>).
  -     * 
  -     * @param topLevel The element underneath which the collection exists
  -     * @param lookingFor Code indicating what elements to look for
  -     */
  -    HTMLCollectionImpl( HTMLElement topLevel, short lookingFor )
  -    {
  -        if ( topLevel == null )
  -            throw new NullPointerException( "HTM011 Argument 'topLevel' is null." );
  -        _topLevel = topLevel;
  -       _lookingFor = lookingFor;
  -    }
  -  
  -  
  -    /**
  -     * Returns the length of the collection. This method might traverse the
  -     * entire document tree.
  -     * 
  -     * @return Length of the collection
  -     */
  -    public final int getLength()
  -    {
  -        // Call recursive function on top-level element.
  -        return getLength( _topLevel );
  -    }
  -
  -
  -    /**
  -     * Retrieves the indexed node from the collection. Nodes are numbered in
  -     * tree order - depth-first traversal order. This method might traverse
  -     * the entire document tree.
  -     * 
  -     * @param index The index of the node to return
  -     * @return The specified node or null if no such node found
  -     */
  -    public final Node item( int index )
  -    {
  -        if ( index < 0 )
  -            throw new IllegalArgumentException( "HTM012 Argument 'index' is negative." );
  -        // Call recursive function on top-level element.
  -        return item( _topLevel, new CollectionIndex( index ) );
  -    }
  -    
  -    
  -    /**
  -     * Retrieves the named node from the collection. The name is matched case
  -     * sensitive against the <TT>id</TT> attribute of each element in the
  -     * collection, returning the first match. The tree is traversed in
  -     * depth-first order. This method might traverse the entire document tree.
  -     * 
  -     * @param name The name of the node to return
  -     * @return The specified node or null if no such node found
  -     */
  -    public final Node namedItem( String name )
  -    {
  -        if ( name == null )
  -            throw new NullPointerException( "HTM013 Argument 'name' is null." );
  -        // Call recursive function on top-level element.
  -        return namedItem( _topLevel, name );
  -    }
  -    
  -    
  -    /**
  -     * Recursive function returns the number of elements of a particular type
  -     * that exist under the top level element. This is a recursive function
  -     * and the top level element is passed along.
  -     * 
  -     * @param topLevel Top level element from which to scan
  -     * @return Number of elements
  -     */
  -    private int getLength( Element topLevel )
  -    {
  -        int        length;
  -        Node    node;
  -    
  -        synchronized ( topLevel )
  -        {
  -            // Always count from zero and traverse all the childs of the
  -            // current element in the order they appear.
  -            length = 0;
  -            node = topLevel.getFirstChild();
  -            while ( node != null )
  -            {
  -                // If a particular node is an element (could be HTML or XML),
  -		// do two things: if it's the one we're looking for, count
  -		// another matched element; at any rate, traverse it's
  -		// children as well.
  -                if ( node instanceof Element )
  -                {
  -                    if ( collectionMatch( (Element) node, null ) )
  -                        ++ length;
  -                    else if ( recurse() )
  -                        length += getLength( (Element) node );
  -                }
  -                node = node.getNextSibling(); 
  -            }
  -        }
  -        return length;
  -    }
  -    
  -        
  -    /**
  -     * Recursive function returns the numbered element of a particular type
  -     * that exist under the top level element. This is a recursive function
  -     * and the top level element is passed along.
  -     * <p>
  -     * Note that this function must call itself with an index and get back both
  -     * the element (if one was found) and the new index which is decremeneted
  -     * for any like element found. Since integers are only passed by value,
  -     * this function makes use of a separate class ({@link CollectionIndex})
  -     * to hold that index.
  -     * 
  -     * @param topLevel Top level element from which to scan
  -     * @param index The index of the item to retreive
  -     * @return Number of elements
  -     * @see CollectionIndex
  -     */
  -    private Node item( Element topLevel, CollectionIndex index )
  -    {
  -        Node    node;
  -        Node    result;
  -
  -        synchronized ( topLevel )
  -        {
  -            // Traverse all the childs of the current element in the order
  -	    // they appear. Count from the index backwards until you reach
  -	    // matching element with an index of zero. Return that element.
  -            node = topLevel.getFirstChild();
  -            while ( node != null )
  -            {
  -                // If a particular node is an element (could be HTML or XML),
  -		// do two things: if it's the one we're looking for, decrease
  -		// the index and if zero, return this node; at any rate,
  -		// traverse it's children as well.
  -                if ( node instanceof Element )
  -                {
  -                    if ( collectionMatch( (Element) node, null ) )
  -                    {
  -                        if ( index.isZero() )
  -                            return node;
  -                        index.decrement();
  -                    } else if ( recurse() )
  -                    {
  -                        result = item( (Element) node, index );
  -                        if ( result != null )
  -                            return result;
  -                    }
  -                }
  -                node = node.getNextSibling(); 
  -            }
  -        }
  -        return null;
  -    }
  -    
  -    
  -    /**
  -     * Recursive function returns an element of a particular type with the
  -     * specified name (<TT>id</TT> attribute).
  -     * 
  -     * @param topLevel Top level element from which to scan
  -     * @param name The named element to look for
  -     * @return The first named element found
  -     */
  -    private  Node namedItem( Element topLevel, String name )
  -    {
  -        Node    node;
  -        Node    result;
  -
  -        synchronized ( topLevel )
  -        {
  -            // Traverse all the childs of the current element in the order
  -	    // they appear.
  -            node = topLevel.getFirstChild();
  -            while ( node != null )
  -            {
  -                // If a particular node is an element (could be HTML or XML),
  -                // do two things: if it's the one we're looking for, and the
  -		// name (id attribute) attribute is the one we're looking for,
  -		// return this element; otherwise, traverse it's children.
  -                if ( node instanceof Element )
  -                {
  -                    if ( collectionMatch( (Element) node, name ) )
  -                        return node;
  -                    else if ( recurse() )
  -                    {
  -                        result = namedItem( (Element) node, name );
  -                        if ( result != null )
  -                            return result;
  -                    }
  -                }
  -                node = node.getNextSibling(); 
  -            }
  -            return node;
  -        }
  -    }
  -    
  -    
  -    /**
  -     * Returns true if scanning methods should iterate through the collection.
  -     * When looking for elements in the document, recursing is needed to traverse
  -     * the full document tree. When looking inside a specific element (e.g. for a
  -     * cell inside a row), recursing can lead to erroneous results.
  -     * 
  -     * @return True if methods should recurse to traverse entire tree
  -     */
  -    protected boolean recurse()
  -    {
  -        return _lookingFor > 0;
  -    }
  -    
  -
  -    /**
  -     * Determines if current element matches based on what we're looking for.
  -     * The element is passed along with an optional identifier name. If the
  -     * element is the one we're looking for, return true. If the name is also
  -     * specified, the name must match the <code>id</code> attribute
  -     * (match <code>name</code> first for anchors).
  -     * 
  -     * @param elem The current element
  -     * @param name The identifier name or null
  -     * @return The element matches what we're looking for
  -     */
  -    protected boolean collectionMatch( Element elem, String name )
  -    {
  -        boolean    match;
  -        
  -        synchronized ( elem )
  -        {
  -            // Begin with no matching. Depending on what we're looking for,
  -            // attempt to match based on the element type. This is the quickest
  -            // way to match involving only a cast. Do the expensive string
  -            // comparison later on.
  -            match = false;
  -            switch ( _lookingFor )
  -            {
  -            case ANCHOR:
  -                // Anchor is an <A> element with a 'name' attribute. Otherwise, it's
  -                // just a link.
  -                match = ( elem instanceof HTMLAnchorElement ) &&
  -                        elem.getAttribute( "name" ).length() > 0;
  -                break;
  -            case FORM:
  -                // Any <FORM> element.
  -                match = ( elem instanceof HTMLFormElement );
  -                break;
  -            case IMAGE:
  -                // Any <IMG> element. <OBJECT> elements with images are not returned.
  -                match = ( elem instanceof HTMLImageElement );
  -                break;
  -            case APPLET:
  -                // Any <APPLET> element, and any <OBJECT> element which represents an
  -                // Applet. This is determined by 'codetype' attribute being
  -                // 'application/java' or 'classid' attribute starting with 'java:'.
  -                match = ( elem instanceof HTMLAppletElement ) ||
  -                        ( elem instanceof HTMLObjectElement &&
  -                          ( "application/java".equals( elem.getAttribute( "codetype" ) ) ||
  -                            elem.getAttribute( "classid" ).startsWith( "java:" ) ) );
  -                break;
  -            case ELEMENT:
  -                // All form elements implement HTMLFormControl for easy identification.
  -                match = ( elem instanceof HTMLFormControl );
  -                break;
  -            case LINK:
  -                // Any <A> element, and any <AREA> elements with an 'href' attribute.
  -                match = ( ( elem instanceof HTMLAnchorElement ||
  -                            elem instanceof HTMLAreaElement ) &&
  -                          elem.getAttribute( "href" ).length() > 0 );
  -                break;
  -            case AREA:
  -                // Any <AREA> element.
  -                match = ( elem instanceof HTMLAreaElement );
  -                break;
  -            case OPTION:
  -                // Any <OPTION> element.
  -                match = ( elem instanceof HTMLOptionElement );
  -                break;
  -            case ROW:
  -                // Any <TR> element.
  -                match = ( elem instanceof HTMLTableRowElement );
  -                break;
  -            case TBODY:
  -                // Any <TBODY> element (one of three table section types).
  -                match = ( elem instanceof HTMLTableSectionElement &&
  -                          elem.getTagName().equals( "tbody" ) );
  -                break;
  -            case CELL:
  -                // Any <TD> element.
  -                match = ( elem instanceof HTMLTableCellElement );
  -                break;
  -            }
  -        
  -            // If element type was matched and a name was specified, must also match
  -            // the name against either the 'id' or the 'name' attribute. The 'name'
  -            // attribute is relevant only for <A> elements for backward compatibility.
  -            if ( match && name != null )
  -            {
  -                // If an anchor and 'name' attribute matches, return true. Otherwise,
  -                // try 'id' attribute.
  -                if ( elem instanceof HTMLAnchorElement &&
  -                     name.equals( elem.getAttribute( "name" ) ) )
  -                    return true;
  -                match = name.equals( elem.getAttribute( "id" ) );
  -            }
  -        }
  -        return match;
  -    }
  -
  -    
  -}
  -
  -
  -/**
  - * {@link CollectionImpl#item} must traverse down the tree and decrement the
  - * index until it matches an element who's index is zero. Since integers are
  - * passed by value, this class servers to pass the index into each recursion
  - * by reference. It encompasses all the operations that need be performed on
  - * the index, although direct access is possible.
  - * 
  - * @see CollectionImpl#item
  - */
  -class CollectionIndex
  -{
  -    
  -    
  -    /**
  -     * Returns the current index.
  -     * 
  -     * @return Current index
  -     */
  -    int getIndex()
  -    {
  -        return _index;
  -    }
  -    
  -    
  -    /**
  -     * Decrements the index by one.
  -     */
  -    void decrement()
  -    {
  -        -- _index;
  -    }
  -    
  -    
  -    /**
  -     * Returns true if index is zero (or negative).
  -     * 
  -     * @return True if index is zero
  -     */
  -    boolean isZero()
  -    {
  -        return _index <= 0;
  -    }
  -    
  -    
  -    /**
  -     * Constructs a new index with the specified initial value. The index will
  -     * then be decremeneted until it reaches zero.
  -     * 
  -     * @param index The initial value
  -     */
  -    CollectionIndex( int index )
  -    {
  -        _index = index;
  -    }
  -    
  -    
  -    /**
  -     * Holds the actual value that is passed by reference using this class.
  -     */
  -    private int        _index;
  -    
  -
  -}
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * Implements {@link org.w3c.dom.html.HTMLCollection} to traverse any named
  + * elements on a {@link org.w3c.dom.html.HTMLDocument}. The elements type to
  + * look for is identified in the constructor by code. This collection is not
  + * optimized for traversing large trees.
  + * <p>
  + * The collection has to meet two requirements: it has to be live, and it has
  + * to traverse depth first and always return results in that order. As such,
  + * using an object container (such as {@link java.util.Vector}) is expensive on
  + * insert/remove operations. Instead, the collection has been implemented using
  + * three traversing functions. As a result, operations on large documents will
  + * result in traversal of the entire document tree and consume a considerable
  + * amount of time.
  + * <p>
  + * Note that synchronization on the traversed document cannot be achieved.
  + * The document itself cannot be locked, and locking each traversed node is
  + * likely to lead to a dead lock condition. Therefore, there is a chance of the
  + * document being changed as results are fetched; in all likelihood, the results
  + * might be out dated, but not erroneous.
  + * 
  + * 
  + * @version $Revision: 1.4.4.1 $ $Date: 2001/02/14 18:28:50 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLCollection
  + */
  +class HTMLCollectionImpl
  +    implements HTMLCollection
  +{
  +    
  +
  +    /**
  +     * Request collection of all anchors in document: &lt;A&gt; elements that
  +     * have a <code>name</code> attribute.
  +     */
  +    static final short        ANCHOR = 1;
  +    
  +    
  +    /**
  +     * Request collection of all forms in document: &lt;FORM&gt; elements.
  +     */
  +    static final short        FORM = 2;
  +    
  +    
  +    /**
  +     * Request collection of all images in document: &lt;IMAGE&gt; elements.
  +     */
  +    static final short        IMAGE = 3;
  +    
  +    
  +    /**
  +     * Request collection of all Applets in document: &lt;APPLET&gt; and
  +     * &lt;OBJECT&gt; elements (&lt;OBJECT&gt; must contain an Applet).
  +     */
  +    static final short        APPLET = 4;
  +    
  +    
  +    /**
  +     * Request collection of all links in document: &lt;A&gt; and &lt;AREA&gt;
  +     * elements (must have a <code>href</code> attribute).
  +     */
  +    static final short        LINK = 5;
  +    
  +    
  +    /**
  +     * Request collection of all options in selection: &lt;OPTION&gt; elments in
  +     * &lt;SELECT&gt; or &lt;OPTGROUP&gt;.
  +     */
  +    static final short        OPTION = 6;
  +    
  +    
  +    /**
  +     * Request collection of all rows in table: &lt;TR&gt; elements in table or
  +     * table section.
  +     */
  +    static final short        ROW = 7;
  +
  +    
  +    /**
  +     * Request collection of all form elements: &lt;INPUT&gt;, &lt;BUTTON&gt;,
  +     * &lt;SELECT&gt;, &lt;TEXT&gt; and &lt;TEXTAREA&gt; elements inside form
  +     * &lt;FORM&gt;.
  +     */
  +    static final short        ELEMENT = 8;
  +    
  +    
  +    /**
  +     * Request collection of all areas in map: &lt;AREA&gt; element in &lt;MAP&gt;
  +     * (non recursive).
  +     */
  +    static final short        AREA = -1;
  +    
  +
  +    /**
  +     * Request collection of all table bodies in table: &lt;TBODY&gt; element in
  +     * table &lt;TABLE&gt; (non recursive).
  +     */
  +    static final short        TBODY = -2;
  +
  +    
  +    /**
  +     * Request collection of all cells in row: &lt;TD&gt; elements in &lt;TR&gt;
  +     * (non recursive).
  +     */
  +    static final short        CELL = -3;
  +
  +    
  +    /**
  +     * Indicates what this collection is looking for. Holds one of the enumerated
  +     * values and used by {@link #collectionMatch}. Set by the constructor and
  +     * determine the collection's use for its life time.
  +     */
  +    private short            _lookingFor;
  +    
  +    
  +    /**
  +     * This is the top level element underneath which the collection exists.
  +     */
  +    private Element            _topLevel;
  +
  +
  +    /**
  +     * Construct a new collection that retrieves element of the specific type
  +     * (<code>lookingFor</code>) from the specific document portion
  +     * (<code>topLevel</code>).
  +     * 
  +     * @param topLevel The element underneath which the collection exists
  +     * @param lookingFor Code indicating what elements to look for
  +     */
  +    HTMLCollectionImpl( HTMLElement topLevel, short lookingFor )
  +    {
  +        if ( topLevel == null )
  +            throw new NullPointerException( "HTM011 Argument 'topLevel' is null." );
  +        _topLevel = topLevel;
  +       _lookingFor = lookingFor;
  +    }
  +  
  +  
  +    /**
  +     * Returns the length of the collection. This method might traverse the
  +     * entire document tree.
  +     * 
  +     * @return Length of the collection
  +     */
  +    public final int getLength()
  +    {
  +        // Call recursive function on top-level element.
  +        return getLength( _topLevel );
  +    }
  +
  +
  +    /**
  +     * Retrieves the indexed node from the collection. Nodes are numbered in
  +     * tree order - depth-first traversal order. This method might traverse
  +     * the entire document tree.
  +     * 
  +     * @param index The index of the node to return
  +     * @return The specified node or null if no such node found
  +     */
  +    public final Node item( int index )
  +    {
  +        if ( index < 0 )
  +            throw new IllegalArgumentException( "HTM012 Argument 'index' is negative." );
  +        // Call recursive function on top-level element.
  +        return item( _topLevel, new CollectionIndex( index ) );
  +    }
  +    
  +    
  +    /**
  +     * Retrieves the named node from the collection. The name is matched case
  +     * sensitive against the <TT>id</TT> attribute of each element in the
  +     * collection, returning the first match. The tree is traversed in
  +     * depth-first order. This method might traverse the entire document tree.
  +     * 
  +     * @param name The name of the node to return
  +     * @return The specified node or null if no such node found
  +     */
  +    public final Node namedItem( String name )
  +    {
  +        if ( name == null )
  +            throw new NullPointerException( "HTM013 Argument 'name' is null." );
  +        // Call recursive function on top-level element.
  +        return namedItem( _topLevel, name );
  +    }
  +    
  +    
  +    /**
  +     * Recursive function returns the number of elements of a particular type
  +     * that exist under the top level element. This is a recursive function
  +     * and the top level element is passed along.
  +     * 
  +     * @param topLevel Top level element from which to scan
  +     * @return Number of elements
  +     */
  +    private int getLength( Element topLevel )
  +    {
  +        int        length;
  +        Node    node;
  +    
  +        synchronized ( topLevel )
  +        {
  +            // Always count from zero and traverse all the childs of the
  +            // current element in the order they appear.
  +            length = 0;
  +            node = topLevel.getFirstChild();
  +            while ( node != null )
  +            {
  +                // If a particular node is an element (could be HTML or XML),
  +		// do two things: if it's the one we're looking for, count
  +		// another matched element; at any rate, traverse it's
  +		// children as well.
  +                if ( node instanceof Element )
  +                {
  +                    if ( collectionMatch( (Element) node, null ) )
  +                        ++ length;
  +                    else if ( recurse() )
  +                        length += getLength( (Element) node );
  +                }
  +                node = node.getNextSibling(); 
  +            }
  +        }
  +        return length;
  +    }
  +    
  +        
  +    /**
  +     * Recursive function returns the numbered element of a particular type
  +     * that exist under the top level element. This is a recursive function
  +     * and the top level element is passed along.
  +     * <p>
  +     * Note that this function must call itself with an index and get back both
  +     * the element (if one was found) and the new index which is decremeneted
  +     * for any like element found. Since integers are only passed by value,
  +     * this function makes use of a separate class ({@link CollectionIndex})
  +     * to hold that index.
  +     * 
  +     * @param topLevel Top level element from which to scan
  +     * @param index The index of the item to retreive
  +     * @return Number of elements
  +     * @see CollectionIndex
  +     */
  +    private Node item( Element topLevel, CollectionIndex index )
  +    {
  +        Node    node;
  +        Node    result;
  +
  +        synchronized ( topLevel )
  +        {
  +            // Traverse all the childs of the current element in the order
  +	    // they appear. Count from the index backwards until you reach
  +	    // matching element with an index of zero. Return that element.
  +            node = topLevel.getFirstChild();
  +            while ( node != null )
  +            {
  +                // If a particular node is an element (could be HTML or XML),
  +		// do two things: if it's the one we're looking for, decrease
  +		// the index and if zero, return this node; at any rate,
  +		// traverse it's children as well.
  +                if ( node instanceof Element )
  +                {
  +                    if ( collectionMatch( (Element) node, null ) )
  +                    {
  +                        if ( index.isZero() )
  +                            return node;
  +                        index.decrement();
  +                    } else if ( recurse() )
  +                    {
  +                        result = item( (Element) node, index );
  +                        if ( result != null )
  +                            return result;
  +                    }
  +                }
  +                node = node.getNextSibling(); 
  +            }
  +        }
  +        return null;
  +    }
  +    
  +    
  +    /**
  +     * Recursive function returns an element of a particular type with the
  +     * specified name (<TT>id</TT> attribute).
  +     * 
  +     * @param topLevel Top level element from which to scan
  +     * @param name The named element to look for
  +     * @return The first named element found
  +     */
  +    private  Node namedItem( Element topLevel, String name )
  +    {
  +        Node    node;
  +        Node    result;
  +
  +        synchronized ( topLevel )
  +        {
  +            // Traverse all the childs of the current element in the order
  +	    // they appear.
  +            node = topLevel.getFirstChild();
  +            while ( node != null )
  +            {
  +                // If a particular node is an element (could be HTML or XML),
  +                // do two things: if it's the one we're looking for, and the
  +		// name (id attribute) attribute is the one we're looking for,
  +		// return this element; otherwise, traverse it's children.
  +                if ( node instanceof Element )
  +                {
  +                    if ( collectionMatch( (Element) node, name ) )
  +                        return node;
  +                    else if ( recurse() )
  +                    {
  +                        result = namedItem( (Element) node, name );
  +                        if ( result != null )
  +                            return result;
  +                    }
  +                }
  +                node = node.getNextSibling(); 
  +            }
  +            return node;
  +        }
  +    }
  +    
  +    
  +    /**
  +     * Returns true if scanning methods should iterate through the collection.
  +     * When looking for elements in the document, recursing is needed to traverse
  +     * the full document tree. When looking inside a specific element (e.g. for a
  +     * cell inside a row), recursing can lead to erroneous results.
  +     * 
  +     * @return True if methods should recurse to traverse entire tree
  +     */
  +    protected boolean recurse()
  +    {
  +        return _lookingFor > 0;
  +    }
  +    
  +
  +    /**
  +     * Determines if current element matches based on what we're looking for.
  +     * The element is passed along with an optional identifier name. If the
  +     * element is the one we're looking for, return true. If the name is also
  +     * specified, the name must match the <code>id</code> attribute
  +     * (match <code>name</code> first for anchors).
  +     * 
  +     * @param elem The current element
  +     * @param name The identifier name or null
  +     * @return The element matches what we're looking for
  +     */
  +    protected boolean collectionMatch( Element elem, String name )
  +    {
  +        boolean    match;
  +        
  +        synchronized ( elem )
  +        {
  +            // Begin with no matching. Depending on what we're looking for,
  +            // attempt to match based on the element type. This is the quickest
  +            // way to match involving only a cast. Do the expensive string
  +            // comparison later on.
  +            match = false;
  +            switch ( _lookingFor )
  +            {
  +            case ANCHOR:
  +                // Anchor is an <A> element with a 'name' attribute. Otherwise, it's
  +                // just a link.
  +                match = ( elem instanceof HTMLAnchorElement ) &&
  +                        elem.getAttribute( "name" ).length() > 0;
  +                break;
  +            case FORM:
  +                // Any <FORM> element.
  +                match = ( elem instanceof HTMLFormElement );
  +                break;
  +            case IMAGE:
  +                // Any <IMG> element. <OBJECT> elements with images are not returned.
  +                match = ( elem instanceof HTMLImageElement );
  +                break;
  +            case APPLET:
  +                // Any <APPLET> element, and any <OBJECT> element which represents an
  +                // Applet. This is determined by 'codetype' attribute being
  +                // 'application/java' or 'classid' attribute starting with 'java:'.
  +                match = ( elem instanceof HTMLAppletElement ) ||
  +                        ( elem instanceof HTMLObjectElement &&
  +                          ( "application/java".equals( elem.getAttribute( "codetype" ) ) ||
  +                            elem.getAttribute( "classid" ).startsWith( "java:" ) ) );
  +                break;
  +            case ELEMENT:
  +                // All form elements implement HTMLFormControl for easy identification.
  +                match = ( elem instanceof HTMLFormControl );
  +                break;
  +            case LINK:
  +                // Any <A> element, and any <AREA> elements with an 'href' attribute.
  +                match = ( ( elem instanceof HTMLAnchorElement ||
  +                            elem instanceof HTMLAreaElement ) &&
  +                          elem.getAttribute( "href" ).length() > 0 );
  +                break;
  +            case AREA:
  +                // Any <AREA> element.
  +                match = ( elem instanceof HTMLAreaElement );
  +                break;
  +            case OPTION:
  +                // Any <OPTION> element.
  +                match = ( elem instanceof HTMLOptionElement );
  +                break;
  +            case ROW:
  +                // Any <TR> element.
  +                match = ( elem instanceof HTMLTableRowElement );
  +                break;
  +            case TBODY:
  +                // Any <TBODY> element (one of three table section types).
  +                match = ( elem instanceof HTMLTableSectionElement &&
  +                          elem.getTagName().equals( "tbody" ) );
  +                break;
  +            case CELL:
  +                // Any <TD> element.
  +                match = ( elem instanceof HTMLTableCellElement );
  +                break;
  +            }
  +        
  +            // If element type was matched and a name was specified, must also match
  +            // the name against either the 'id' or the 'name' attribute. The 'name'
  +            // attribute is relevant only for <A> elements for backward compatibility.
  +            if ( match && name != null )
  +            {
  +                // If an anchor and 'name' attribute matches, return true. Otherwise,
  +                // try 'id' attribute.
  +                if ( elem instanceof HTMLAnchorElement &&
  +                     name.equals( elem.getAttribute( "name" ) ) )
  +                    return true;
  +                match = name.equals( elem.getAttribute( "id" ) );
  +            }
  +        }
  +        return match;
  +    }
  +
  +    
  +}
  +
  +
  +/**
  + * {@link CollectionImpl#item} must traverse down the tree and decrement the
  + * index until it matches an element who's index is zero. Since integers are
  + * passed by value, this class servers to pass the index into each recursion
  + * by reference. It encompasses all the operations that need be performed on
  + * the index, although direct access is possible.
  + * 
  + * @see CollectionImpl#item
  + */
  +class CollectionIndex
  +{
  +    
  +    
  +    /**
  +     * Returns the current index.
  +     * 
  +     * @return Current index
  +     */
  +    int getIndex()
  +    {
  +        return _index;
  +    }
  +    
  +    
  +    /**
  +     * Decrements the index by one.
  +     */
  +    void decrement()
  +    {
  +        -- _index;
  +    }
  +    
  +    
  +    /**
  +     * Returns true if index is zero (or negative).
  +     * 
  +     * @return True if index is zero
  +     */
  +    boolean isZero()
  +    {
  +        return _index <= 0;
  +    }
  +    
  +    
  +    /**
  +     * Constructs a new index with the specified initial value. The index will
  +     * then be decremeneted until it reaches zero.
  +     * 
  +     * @param index The initial value
  +     */
  +    CollectionIndex( int index )
  +    {
  +        _index = index;
  +    }
  +    
  +    
  +    /**
  +     * Holds the actual value that is passed by reference using this class.
  +     */
  +    private int        _index;
  +    
  +
  +}
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLDListElementImpl.java
  
  Index: HTMLDListElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLDListElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLDListElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLDListElementImpl.java	2001/02/14 18:28:50	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLDListElement
  - * @see ElementImpl
  - */
  -public final class HTMLDListElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLDListElement
  -{
  -    
  -    
  -    public boolean getCompact()
  -    {
  -        return getBinary( "compact" );
  -    }
  -    
  -    
  -    public void setCompact( boolean compact )
  -    {
  -        setAttribute( "compact", compact );
  -    }
  -  
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLDListElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -    
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:50 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLDListElement
  + * @see ElementImpl
  + */
  +public class HTMLDListElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLDListElement
  +{
  +    
  +    
  +    public boolean getCompact()
  +    {
  +        return getBinary( "compact" );
  +    }
  +    
  +    
  +    public void setCompact( boolean compact )
  +    {
  +        setAttribute( "compact", compact );
  +    }
  +  
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLDListElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +    
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLDirectoryElementImpl.java
  
  Index: HTMLDirectoryElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLDirectoryElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLDirectoryElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLDirectoryElementImpl.java	2001/02/14 18:28:50	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLDirectoryElement
  - * @see ElementImpl
  - */
  -public final class HTMLDirectoryElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLDirectoryElement
  -{
  -    
  -    
  -    public boolean getCompact()
  -    {
  -        return getBinary( "compact" );
  -    }
  -    
  -    
  -    public void setCompact( boolean compact )
  -    {
  -        setAttribute( "compact", compact );
  -    }
  -  
  -
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLDirectoryElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:50 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLDirectoryElement
  + * @see ElementImpl
  + */
  +public class HTMLDirectoryElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLDirectoryElement
  +{
  +    
  +    
  +    public boolean getCompact()
  +    {
  +        return getBinary( "compact" );
  +    }
  +    
  +    
  +    public void setCompact( boolean compact )
  +    {
  +        setAttribute( "compact", compact );
  +    }
  +  
  +
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLDirectoryElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +43 -43    xml-xerces/java/src/org/apache/html/dom/HTMLDivElementImpl.java
  
  Index: HTMLDivElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLDivElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLDivElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLDivElementImpl.java	2001/02/14 18:28:50	1.2.4.1
  @@ -54,46 +54,46 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLDivElement
  - * @see ElementImpl
  - */
  -public final class HTMLDivElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLDivElement
  -{
  -    
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLDivElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -    
  -}
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:50 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLDivElement
  + * @see ElementImpl
  + */
  +public class HTMLDivElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLDivElement
  +{
  +    
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLDivElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +    
  +}
  
  
  
  1.3.4.1   +284 -284  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.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- HTMLElementImpl.java	2000/02/10 04:00:09	1.3
  +++ HTMLElementImpl.java	2001/02/14 18:28:51	1.3.4.1
  @@ -54,287 +54,287 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -import org.apache.xerces.dom.ElementImpl;
  -
  -
  -/**
  - * Implements an HTML-specific element, an {@link org.w3c.dom.Element} that
  - * will only appear inside HTML documents. This element extends {@link
  - * org.apache.xerces.dom.ElementImpl} by adding methods for directly
  - * manipulating HTML-specific attributes. All HTML elements gain access to
  - * the <code>id</code>, <code>title</code>, <code>lang</code>,
  - * <code>dir</code> and <code>class</code> attributes. Other elements
  - * add their own specific attributes.
  - * 
  - * 
  - * @version $Revision: 1.3 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLElement
  - */
  -public class HTMLElementImpl
  -    extends ElementImpl
  -    implements HTMLElement
  -{
  -
  -
  -    /**
  -     * Constructor required owner document and element tag name. Will be called
  -     * by the constructor of specific element types but with a known tag name.
  -     * Assures that the owner document is an HTML element.
  -     * 
  -     * @param owner The owner HTML document
  -     * @param tagName The element's tag name
  -     */
  -    HTMLElementImpl( HTMLDocumentImpl owner, String tagName )
  -    {
  -        super( owner, tagName.toUpperCase() );
  -    }
  -    
  -    
  -    public String getId()
  -    {
  -        return getAttribute( "id" );
  -    }
  -    
  -    
  -    public void setId( String id )
  -    {
  -        setAttribute( "id", id );
  -    }
  -    
  -    
  -    public String getTitle()
  -    {
  -        return getAttribute( "title" );
  -    }
  -    
  -    
  -    public void setTitle( String title )
  -    {
  -        setAttribute( "title", title );
  -    }
  -    
  -    
  -    public String getLang()
  -    {
  -        return getAttribute( "lang" );
  -    }
  -    
  -    
  -    public void setLang( String lang )
  -    {
  -        setAttribute( "lang", lang );
  -    }
  -    
  -    
  -    public String getDir()
  -    {
  -        return getAttribute( "dir" );
  -    }
  -    
  -    
  -    public void setDir( String dir )
  -    {
  -        setAttribute( "dir", dir );
  -    }
  -
  -    
  -    public String getClassName()
  -    {
  -        return getAttribute( "class" );
  -    }
  -
  -    
  -    public void setClassName( String className )
  -    {
  -        setAttribute( "class", className );
  -    }
  -    
  -    
  -    /**
  -     * Convenience method used to translate an attribute value into an integer
  -     * value. Returns the integer value or zero if the attribute is not a
  -     * valid numeric string.
  -     * 
  -     * @param value The value of the attribute
  -     * @return The integer value, or zero if not a valid numeric string
  -     */
  -    int getInteger( String value )
  -    {
  -        try
  -        {
  -            return Integer.parseInt( value );
  -        }
  -        catch ( NumberFormatException except )
  -        {
  -            return 0;
  -        }
  -    }
  -    
  -    
  -    /**
  -     * Convenience method used to translate an attribute value into a boolean
  -     * value. If the attribute has an associated value (even an empty string),
  -     * it is set and true is returned. If the attribute does not exist, false
  -     * is returend.
  -     * 
  -     * @param value The value of the attribute
  -     * @return True or false depending on whether the attribute has been set
  -     */
  -    boolean getBinary( String name )
  -    {
  -        return ( getAttributeNode( name ) != null );
  -    }
  -    
  -    
  -    /**
  -     * Convenience method used to set a boolean attribute. If the value is true,
  -     * the attribute is set to an empty string. If the value is false, the attribute
  -     * is removed. HTML 4.0 understands empty strings as set attributes.
  -     * 
  -     * @param name The name of the attribute
  -     * @param value The value of the attribute
  -     */
  -    void setAttribute( String name, boolean value )
  -    {
  -        if ( value )
  -            setAttribute( name, name );
  -        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
  -     * return as "Left".
  -     * 
  -     * @param value The value of the attribute
  -     * @return The capitalized value
  -     */
  -    String capitalize( String value )
  -    {
  -        char[]    chars;
  -        int        i;
  -        
  -        // Convert string to charactares. Convert the first one to upper case,
  -        // the other characters to lower case, and return the converted string.
  -        chars = value.toCharArray();
  -        if ( chars.length > 0 )
  -        {
  -            chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
  -            for ( i = 1 ; i < chars.length ; ++i )
  -                chars[ i ] = Character.toLowerCase( chars[ i ] );
  -            return String.valueOf( chars );
  -        }
  -        return value;
  -    }
  -    
  -
  -    /**
  -     * Convenience method used to capitalize a one-off attribute value before it
  -     * is returned. For example, the align values "LEFT" and "left" will both
  -     * return as "Left".
  -     * 
  -     * @param name The name of the attribute
  -     * @return The capitalized value
  -     */
  -    String getCapitalized( String name )
  -    {
  -        String    value;
  -        char[]    chars;
  -        int        i;
  -        
  -        value = getAttribute( name );
  -        if ( value != null )
  -        {
  -            // Convert string to charactares. Convert the first one to upper case,
  -            // the other characters to lower case, and return the converted string.
  -            chars = value.toCharArray();
  -            if ( chars.length > 0 )
  -            {
  -                chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
  -                for ( i = 1 ; i < chars.length ; ++i )
  -                    chars[ i ] = Character.toLowerCase( chars[ i ] );
  -                return String.valueOf( chars );
  -            }
  -        }
  -        return value;
  -    }
  -
  -    
  -    /**
  -     * Convenience method returns the form in which this form element is contained.
  -     * This method is exposed for form elements through the DOM API, but other
  -     * elements have no access to it through the API.
  -     */
  -    public HTMLFormElement getForm()
  -    {
  -        Node    parent;
  -        
  -        parent = getParentNode(); 
  -        while ( parent != null )
  -        {
  -            if ( parent instanceof HTMLFormElement )
  -                return (HTMLFormElement) parent;
  -            parent = parent.getParentNode();
  -        }
  -        return null;
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +import org.apache.xerces.dom.ElementImpl;
  +
  +
  +/**
  + * Implements an HTML-specific element, an {@link org.w3c.dom.Element} that
  + * will only appear inside HTML documents. This element extends {@link
  + * org.apache.xerces.dom.ElementImpl} by adding methods for directly
  + * manipulating HTML-specific attributes. All HTML elements gain access to
  + * the <code>id</code>, <code>title</code>, <code>lang</code>,
  + * <code>dir</code> and <code>class</code> attributes. Other elements
  + * add their own specific attributes.
  + * 
  + * 
  + * @version $Revision: 1.3.4.1 $ $Date: 2001/02/14 18:28:51 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLElement
  + */
  +public class HTMLElementImpl
  +    extends ElementImpl
  +    implements HTMLElement
  +{
  +
  +
  +    /**
  +     * Constructor required owner document and element tag name. Will be called
  +     * by the constructor of specific element types but with a known tag name.
  +     * Assures that the owner document is an HTML element.
  +     * 
  +     * @param owner The owner HTML document
  +     * @param tagName The element's tag name
  +     */
  +    HTMLElementImpl( HTMLDocumentImpl owner, String tagName )
  +    {
  +        super( owner, tagName.toUpperCase() );
  +    }
  +    
  +    
  +    public String getId()
  +    {
  +        return getAttribute( "id" );
  +    }
  +    
  +    
  +    public void setId( String id )
  +    {
  +        setAttribute( "id", id );
  +    }
  +    
  +    
  +    public String getTitle()
  +    {
  +        return getAttribute( "title" );
  +    }
  +    
  +    
  +    public void setTitle( String title )
  +    {
  +        setAttribute( "title", title );
  +    }
  +    
  +    
  +    public String getLang()
  +    {
  +        return getAttribute( "lang" );
  +    }
  +    
  +    
  +    public void setLang( String lang )
  +    {
  +        setAttribute( "lang", lang );
  +    }
  +    
  +    
  +    public String getDir()
  +    {
  +        return getAttribute( "dir" );
  +    }
  +    
  +    
  +    public void setDir( String dir )
  +    {
  +        setAttribute( "dir", dir );
  +    }
  +
  +    
  +    public String getClassName()
  +    {
  +        return getAttribute( "class" );
  +    }
  +
  +    
  +    public void setClassName( String className )
  +    {
  +        setAttribute( "class", className );
  +    }
  +    
  +    
  +    /**
  +     * Convenience method used to translate an attribute value into an integer
  +     * value. Returns the integer value or zero if the attribute is not a
  +     * valid numeric string.
  +     * 
  +     * @param value The value of the attribute
  +     * @return The integer value, or zero if not a valid numeric string
  +     */
  +    int getInteger( String value )
  +    {
  +        try
  +        {
  +            return Integer.parseInt( value );
  +        }
  +        catch ( NumberFormatException except )
  +        {
  +            return 0;
  +        }
  +    }
  +    
  +    
  +    /**
  +     * Convenience method used to translate an attribute value into a boolean
  +     * value. If the attribute has an associated value (even an empty string),
  +     * it is set and true is returned. If the attribute does not exist, false
  +     * is returend.
  +     * 
  +     * @param value The value of the attribute
  +     * @return True or false depending on whether the attribute has been set
  +     */
  +    boolean getBinary( String name )
  +    {
  +        return ( getAttributeNode( name ) != null );
  +    }
  +    
  +    
  +    /**
  +     * Convenience method used to set a boolean attribute. If the value is true,
  +     * the attribute is set to an empty string. If the value is false, the attribute
  +     * is removed. HTML 4.0 understands empty strings as set attributes.
  +     * 
  +     * @param name The name of the attribute
  +     * @param value The value of the attribute
  +     */
  +    void setAttribute( String name, boolean value )
  +    {
  +        if ( value )
  +            setAttribute( name, name );
  +        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
  +     * return as "Left".
  +     * 
  +     * @param value The value of the attribute
  +     * @return The capitalized value
  +     */
  +    String capitalize( String value )
  +    {
  +        char[]    chars;
  +        int        i;
  +        
  +        // Convert string to charactares. Convert the first one to upper case,
  +        // the other characters to lower case, and return the converted string.
  +        chars = value.toCharArray();
  +        if ( chars.length > 0 )
  +        {
  +            chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
  +            for ( i = 1 ; i < chars.length ; ++i )
  +                chars[ i ] = Character.toLowerCase( chars[ i ] );
  +            return String.valueOf( chars );
  +        }
  +        return value;
  +    }
  +    
  +
  +    /**
  +     * Convenience method used to capitalize a one-off attribute value before it
  +     * is returned. For example, the align values "LEFT" and "left" will both
  +     * return as "Left".
  +     * 
  +     * @param name The name of the attribute
  +     * @return The capitalized value
  +     */
  +    String getCapitalized( String name )
  +    {
  +        String    value;
  +        char[]    chars;
  +        int        i;
  +        
  +        value = getAttribute( name );
  +        if ( value != null )
  +        {
  +            // Convert string to charactares. Convert the first one to upper case,
  +            // the other characters to lower case, and return the converted string.
  +            chars = value.toCharArray();
  +            if ( chars.length > 0 )
  +            {
  +                chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
  +                for ( i = 1 ; i < chars.length ; ++i )
  +                    chars[ i ] = Character.toLowerCase( chars[ i ] );
  +                return String.valueOf( chars );
  +            }
  +        }
  +        return value;
  +    }
  +
  +    
  +    /**
  +     * Convenience method returns the form in which this form element is contained.
  +     * This method is exposed for form elements through the DOM API, but other
  +     * elements have no access to it through the API.
  +     */
  +    public HTMLFormElement getForm()
  +    {
  +        Node    parent;
  +        
  +        parent = getParentNode(); 
  +        while ( parent != null )
  +        {
  +            if ( parent instanceof HTMLFormElement )
  +                return (HTMLFormElement) parent;
  +            parent = parent.getParentNode();
  +        }
  +        return null;
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +32 -32    xml-xerces/java/src/org/apache/html/dom/HTMLFieldSetElementImpl.java
  
  Index: HTMLFieldSetElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFieldSetElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFieldSetElementImpl.java	2000/02/10 04:00:09	1.2
  +++ HTMLFieldSetElementImpl.java	2001/02/14 18:28:51	1.2.4.1
  @@ -54,35 +54,35 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:09 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLFieldSetElement
  - * @see ElementImpl
  - */
  -public final class HTMLFieldSetElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLFieldSetElement, HTMLFormControl
  -{
  -
  -
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLFieldSetElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:51 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLFieldSetElement
  + * @see ElementImpl
  + */
  +public class HTMLFieldSetElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLFieldSetElement, HTMLFormControl
  +{
  +
  +
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLFieldSetElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +
  +}
  +
  
  
  
  1.2.4.1   +62 -62    xml-xerces/java/src/org/apache/html/dom/HTMLFontElementImpl.java
  
  Index: HTMLFontElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFontElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFontElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLFontElementImpl.java	2001/02/14 18:28:51	1.2.4.1
  @@ -54,65 +54,65 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLFontElement
  - * @see ElementImpl
  - */
  -public final class HTMLFontElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLFontElement
  -{
  -
  -    
  -    public String getColor()
  -    {
  -        return capitalize( getAttribute( "color" ) );
  -    }
  -    
  -    
  -    public void setColor( String color )
  -    {
  -        setAttribute( "color", color );
  -    }
  -    
  -    
  -    public String getFace()
  -    {
  -        return capitalize( getAttribute( "face" ) );
  -    }
  -    
  -    
  -    public void setFace( String face )
  -    {
  -        setAttribute( "face", face );
  -    }
  -    
  -    
  -    public String getSize()
  -    {
  -        return getAttribute( "size" );
  -    }
  -    
  -    
  -    public void setSize( String size )
  -    {
  -        setAttribute( "size", size );
  -    }
  -
  -    
  -    public HTMLFontElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -
  -}
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:51 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLFontElement
  + * @see ElementImpl
  + */
  +public class HTMLFontElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLFontElement
  +{
  +
  +    
  +    public String getColor()
  +    {
  +        return capitalize( getAttribute( "color" ) );
  +    }
  +    
  +    
  +    public void setColor( String color )
  +    {
  +        setAttribute( "color", color );
  +    }
  +    
  +    
  +    public String getFace()
  +    {
  +        return capitalize( getAttribute( "face" ) );
  +    }
  +    
  +    
  +    public void setFace( String face )
  +    {
  +        setAttribute( "face", face );
  +    }
  +    
  +    
  +    public String getSize()
  +    {
  +        return getAttribute( "size" );
  +    }
  +    
  +    
  +    public void setSize( String size )
  +    {
  +        setAttribute( "size", size );
  +    }
  +
  +    
  +    public HTMLFontElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +
  +}
  
  
  
  1.2.4.1   +14 -14    xml-xerces/java/src/org/apache/html/dom/HTMLFormControl.java
  
  Index: HTMLFormControl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFormControl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFormControl.java	2000/02/10 04:00:10	1.2
  +++ HTMLFormControl.java	2001/02/14 18:28:51	1.2.4.1
  @@ -54,17 +54,17 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -/**
  - * Identifies control in a form, so they may be collected in a form elements
  - * collection. All form control elements implement this empty interface.
  - * 
  - * 
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - */
  -public interface HTMLFormControl
  -{
  -}
  +package org.apache.html.dom;
  +
  +
  +/**
  + * Identifies control in a form, so they may be collected in a form elements
  + * collection. All form control elements implement this empty interface.
  + * 
  + * 
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:51 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + */
  +public interface HTMLFormControl
  +{
  +}
  
  
  
  1.2.4.1   +142 -135  xml-xerces/java/src/org/apache/html/dom/HTMLFormElementImpl.java
  
  Index: HTMLFormElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFormElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFormElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLFormElementImpl.java	2001/02/14 18:28:51	1.2.4.1
  @@ -54,138 +54,145 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLFormElement
  - * @see ElementImpl
  - */
  -public final class HTMLFormElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLFormElement
  -{
  -
  -    
  -    public HTMLCollection getElements()
  -    {
  -        if ( _elements == null )
  -            _elements = new HTMLCollectionImpl( this, HTMLCollectionImpl.ELEMENT );
  -        return _elements;
  -    }
  -  
  -
  -    public int getLength()
  -    {
  -        return getElements().getLength();
  -    }
  -  
  -  
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public String getAcceptCharset()
  -    {
  -        return getAttribute( "accept-charset" );
  -    }
  -    
  -    
  -    public void setAcceptCharset( String acceptCharset )
  -    {
  -        setAttribute( "accept-charset", acceptCharset );
  -    }
  -
  -  
  -      public String getAction()
  -    {
  -        return getAttribute( "action" );
  -    }
  -    
  -    
  -    public void setAction( String action )
  -    {
  -        setAttribute( "action", action );
  -    }
  -  
  -  
  -      public String getEnctype()
  -    {
  -        return getAttribute( "enctype" );
  -    }
  -    
  -    
  -    public void setEnctype( String enctype )
  -    {
  -        setAttribute( "enctype", enctype );
  -    }
  -
  -    
  -      public String getMethod()
  -    {
  -        return capitalize( getAttribute( "method" ) );
  -    }
  -    
  -    
  -    public void setMethod( String method )
  -    {
  -        setAttribute( "method", method );
  -    }
  -  
  -  
  -    public String getTarget()
  -    {
  -        return getAttribute( "target" );
  -    }
  -    
  -    
  -    public void setTarget( String target )
  -    {
  -        setAttribute( "target", target );
  -    }
  -
  -    
  -    public void submit()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -
  -    
  -    public void reset()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLFormElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -    
  -    /**
  -     * Collection of all elements contained in this FORM.
  -     */
  -    private HTMLCollectionImpl    _elements;
  -    
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:51 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLFormElement
  + * @see ElementImpl
  + */
  +public class HTMLFormElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLFormElement
  +{
  +
  +    
  +    public HTMLCollection getElements()
  +    {
  +        if ( _elements == null )
  +            _elements = new HTMLCollectionImpl( this, HTMLCollectionImpl.ELEMENT );
  +        return _elements;
  +    }
  +  
  +
  +    public int getLength()
  +    {
  +        return getElements().getLength();
  +    }
  +  
  +  
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public String getAcceptCharset()
  +    {
  +        return getAttribute( "accept-charset" );
  +    }
  +    
  +    
  +    public void setAcceptCharset( String acceptCharset )
  +    {
  +        setAttribute( "accept-charset", acceptCharset );
  +    }
  +
  +  
  +      public String getAction()
  +    {
  +        return getAttribute( "action" );
  +    }
  +    
  +    
  +    public void setAction( String action )
  +    {
  +        setAttribute( "action", action );
  +    }
  +  
  +  
  +      public String getEnctype()
  +    {
  +        return getAttribute( "enctype" );
  +    }
  +    
  +    
  +    public void setEnctype( String enctype )
  +    {
  +        setAttribute( "enctype", enctype );
  +    }
  +
  +    
  +      public String getMethod()
  +    {
  +        return capitalize( getAttribute( "method" ) );
  +    }
  +    
  +    
  +    public void setMethod( String method )
  +    {
  +        setAttribute( "method", method );
  +    }
  +  
  +  
  +    public String getTarget()
  +    {
  +        return getAttribute( "target" );
  +    }
  +    
  +    
  +    public void setTarget( String target )
  +    {
  +        setAttribute( "target", target );
  +    }
  +
  +    
  +    public void submit()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +
  +    
  +    public void reset()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +
  +    /*
  +     * Explicit implementation of getChildNodes() to avoid problems with
  +     * overriding the getLength() method hidden in the super class.
  +     */
  +    public NodeList getChildNodes() {
  +        return getChildNodesUnoptimized();
  +    }
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLFormElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +    
  +    /**
  +     * Collection of all elements contained in this FORM.
  +     */
  +    private HTMLCollectionImpl    _elements;
  +    
  +}
  +
  
  
  
  1.2.4.1   +128 -128  xml-xerces/java/src/org/apache/html/dom/HTMLFrameElementImpl.java
  
  Index: HTMLFrameElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFrameElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFrameElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLFrameElementImpl.java	2001/02/14 18:28:52	1.2.4.1
  @@ -54,131 +54,131 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLFrameElement
  - * @see ElementImpl
  - */
  -public final class HTMLFrameElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLFrameElement
  -{
  -
  -    
  -    public String getFrameBorder()
  -    {
  -        return getAttribute( "frameborder" );
  -    }
  -    
  -    
  -    public void setFrameBorder( String frameBorder )
  -    {
  -        setAttribute( "frameborder", frameBorder );
  -    }
  -  
  -  
  -    public String getLongDesc()
  -    {
  -        return getAttribute( "longdesc" );
  -    }
  -    
  -    
  -    public void setLongDesc( String longDesc )
  -    {
  -        setAttribute( "longdesc", longDesc );
  -    }
  -  
  -  
  -    public String getMarginHeight()
  -    {
  -        return getAttribute( "marginheight" );
  -    }
  -    
  -    
  -    public void setMarginHeight( String marginHeight )
  -    {
  -        setAttribute( "marginheight", marginHeight );
  -    }
  -  
  -  
  -    public String getMarginWidth()
  -    {
  -        return getAttribute( "marginwidth" );
  -    }
  -    
  -    
  -    public void setMarginWidth( String marginWidth )
  -    {
  -        setAttribute( "marginwidth", marginWidth );
  -    }
  -  
  -  
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public boolean getNoResize()
  -    {
  -        return getBinary( "noresize" );
  -    }
  -    
  -    
  -    public void setNoResize( boolean noResize )
  -    {
  -        setAttribute( "noresize", noResize );
  -    }
  -
  -    
  -    public String getScrolling()
  -    {
  -        return capitalize( getAttribute( "scrolling" ) );
  -    }
  -    
  -    
  -    public void setScrolling( String scrolling )
  -    {
  -        setAttribute( "scrolling", scrolling );
  -    }
  -  
  -  
  -    public String getSrc()
  -    {
  -        return getAttribute( "src" );
  -    }
  -    
  -    
  -    public void setSrc( String src )
  -    {
  -        setAttribute( "src", src );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLFrameElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:52 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLFrameElement
  + * @see ElementImpl
  + */
  +public class HTMLFrameElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLFrameElement
  +{
  +
  +    
  +    public String getFrameBorder()
  +    {
  +        return getAttribute( "frameborder" );
  +    }
  +    
  +    
  +    public void setFrameBorder( String frameBorder )
  +    {
  +        setAttribute( "frameborder", frameBorder );
  +    }
  +  
  +  
  +    public String getLongDesc()
  +    {
  +        return getAttribute( "longdesc" );
  +    }
  +    
  +    
  +    public void setLongDesc( String longDesc )
  +    {
  +        setAttribute( "longdesc", longDesc );
  +    }
  +  
  +  
  +    public String getMarginHeight()
  +    {
  +        return getAttribute( "marginheight" );
  +    }
  +    
  +    
  +    public void setMarginHeight( String marginHeight )
  +    {
  +        setAttribute( "marginheight", marginHeight );
  +    }
  +  
  +  
  +    public String getMarginWidth()
  +    {
  +        return getAttribute( "marginwidth" );
  +    }
  +    
  +    
  +    public void setMarginWidth( String marginWidth )
  +    {
  +        setAttribute( "marginwidth", marginWidth );
  +    }
  +  
  +  
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public boolean getNoResize()
  +    {
  +        return getBinary( "noresize" );
  +    }
  +    
  +    
  +    public void setNoResize( boolean noResize )
  +    {
  +        setAttribute( "noresize", noResize );
  +    }
  +
  +    
  +    public String getScrolling()
  +    {
  +        return capitalize( getAttribute( "scrolling" ) );
  +    }
  +    
  +    
  +    public void setScrolling( String scrolling )
  +    {
  +        setAttribute( "scrolling", scrolling );
  +    }
  +  
  +  
  +    public String getSrc()
  +    {
  +        return getAttribute( "src" );
  +    }
  +    
  +    
  +    public void setSrc( String src )
  +    {
  +        setAttribute( "src", src );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLFrameElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +
  +}
  +
  
  
  
  1.2.4.1   +56 -56    xml-xerces/java/src/org/apache/html/dom/HTMLFrameSetElementImpl.java
  
  Index: HTMLFrameSetElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLFrameSetElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLFrameSetElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLFrameSetElementImpl.java	2001/02/14 18:28:52	1.2.4.1
  @@ -54,59 +54,59 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLFrameSetElement
  - * @see ElementImpl
  - */
  -public final class HTMLFrameSetElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLFrameSetElement
  -{
  -
  -    
  -    public String getCols()
  -    {
  -        return getAttribute( "cols" );
  -    }
  -    
  -    
  -    public void setCols( String cols )
  -    {
  -        setAttribute( "cols", cols );
  -    }
  -
  -    
  -    public String getRows()
  -    {
  -        return getAttribute( "rows" );
  -    }
  -    
  -    
  -    public void setRows( String rows )
  -    {
  -        setAttribute( "rows", rows );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLFrameSetElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:52 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLFrameSetElement
  + * @see ElementImpl
  + */
  +public class HTMLFrameSetElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLFrameSetElement
  +{
  +
  +    
  +    public String getCols()
  +    {
  +        return getAttribute( "cols" );
  +    }
  +    
  +    
  +    public void setCols( String cols )
  +    {
  +        setAttribute( "cols", cols );
  +    }
  +
  +    
  +    public String getRows()
  +    {
  +        return getAttribute( "rows" );
  +    }
  +    
  +    
  +    public void setRows( String rows )
  +    {
  +        setAttribute( "rows", rows );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLFrameSetElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +
  +}
  +
  
  
  
  1.2.4.1   +80 -80    xml-xerces/java/src/org/apache/html/dom/HTMLHRElementImpl.java
  
  Index: HTMLHRElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLHRElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLHRElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLHRElementImpl.java	2001/02/14 18:28:52	1.2.4.1
  @@ -54,83 +54,83 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLHRElement
  - * @see ElementImpl
  - */
  -public final class HTMLHRElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLHRElement
  -{
  -
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public boolean getNoShade()
  -    {
  -        return getBinary( "noshade" );
  -    }
  -    
  -    
  -    public void setNoShade( boolean noShade )
  -    {
  -        setAttribute( "noshade", noShade );
  -    }
  -
  -    
  -    public String getSize()
  -    {
  -        return getAttribute( "size" );
  -    }
  -    
  -    
  -    public void setSize( String size )
  -    {
  -        setAttribute( "size", size );
  -    }
  -  
  -  
  -      public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -    
  -
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLHRElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:52 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLHRElement
  + * @see ElementImpl
  + */
  +public class HTMLHRElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLHRElement
  +{
  +
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public boolean getNoShade()
  +    {
  +        return getBinary( "noshade" );
  +    }
  +    
  +    
  +    public void setNoShade( boolean noShade )
  +    {
  +        setAttribute( "noshade", noShade );
  +    }
  +
  +    
  +    public String getSize()
  +    {
  +        return getAttribute( "size" );
  +    }
  +    
  +    
  +    public void setSize( String size )
  +    {
  +        setAttribute( "size", size );
  +    }
  +  
  +  
  +      public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +    
  +
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLHRElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLHeadElementImpl.java
  
  Index: HTMLHeadElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLHeadElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLHeadElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLHeadElementImpl.java	2001/02/14 18:28:52	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLHeadElement
  - * @see ElementImpl
  - */
  -public final class HTMLHeadElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLHeadElement
  -{
  -
  -    
  -    public String getProfile()
  -    {
  -        return getAttribute( "profile" );
  -    }
  -    
  -    
  -    public void setProfile( String profile )
  -    {
  -        setAttribute( "profile", profile );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLHeadElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:52 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLHeadElement
  + * @see ElementImpl
  + */
  +public class HTMLHeadElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLHeadElement
  +{
  +
  +    
  +    public String getProfile()
  +    {
  +        return getAttribute( "profile" );
  +    }
  +    
  +    
  +    public void setProfile( String profile )
  +    {
  +        setAttribute( "profile", profile );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLHeadElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLHeadingElementImpl.java
  
  Index: HTMLHeadingElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLHeadingElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLHeadingElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLHeadingElementImpl.java	2001/02/14 18:28:52	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLHeadingElement
  - * @see ElementImpl
  - */
  -public final class HTMLHeadingElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLHeadingElement
  -{
  -
  -    
  -    public String getAlign()
  -    {
  -        return getCapitalized( "align" );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLHeadingElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:52 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLHeadingElement
  + * @see ElementImpl
  + */
  +public class HTMLHeadingElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLHeadingElement
  +{
  +
  +    
  +    public String getAlign()
  +    {
  +        return getCapitalized( "align" );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLHeadingElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLHtmlElementImpl.java
  
  Index: HTMLHtmlElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLHtmlElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLHtmlElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLHtmlElementImpl.java	2001/02/14 18:28:53	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLHtmlElement
  - * @see ElementImpl
  - */
  -public final class HTMLHtmlElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLHtmlElement
  -{
  -
  -    
  -    public String getVersion()
  -    {
  -        return capitalize( getAttribute( "version" ) );
  -    }
  -    
  -    
  -    public void setVersion( String version )
  -    {
  -        setAttribute( "version", version );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLHtmlElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:53 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLHtmlElement
  + * @see ElementImpl
  + */
  +public class HTMLHtmlElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLHtmlElement
  +{
  +
  +    
  +    public String getVersion()
  +    {
  +        return capitalize( getAttribute( "version" ) );
  +    }
  +    
  +    
  +    public void setVersion( String version )
  +    {
  +        setAttribute( "version", version );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLHtmlElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +151 -151  xml-xerces/java/src/org/apache/html/dom/HTMLIFrameElementImpl.java
  
  Index: HTMLIFrameElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLIFrameElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLIFrameElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLIFrameElementImpl.java	2001/02/14 18:28:53	1.2.4.1
  @@ -54,154 +54,154 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLIFrameElement
  - * @see ElementImpl
  - */
  -public final class HTMLIFrameElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLIFrameElement
  -{
  -
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getFrameBorder()
  -    {
  -        return getAttribute( "frameborder" );
  -    }
  -    
  -    
  -    public void setFrameBorder( String frameBorder )
  -    {
  -        setAttribute( "frameborder", frameBorder );
  -    }
  -
  -    
  -    public String getHeight()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHeight( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -  
  -    public String getLongDesc()
  -    {
  -        return getAttribute( "longdesc" );
  -    }
  -    
  -    
  -    public void setLongDesc( String longDesc )
  -    {
  -        setAttribute( "longdesc", longDesc );
  -    }
  -  
  -  
  -    public String getMarginHeight()
  -    {
  -        return getAttribute( "marginheight" );
  -    }
  -    
  -    
  -    public void setMarginHeight( String marginHeight )
  -    {
  -        setAttribute( "marginheight", marginHeight );
  -    }
  -  
  -  
  -    public String getMarginWidth()
  -    {
  -        return getAttribute( "marginwidth" );
  -    }
  -    
  -    
  -    public void setMarginWidth( String marginWidth )
  -    {
  -        setAttribute( "marginwidth", marginWidth );
  -    }
  -
  -  
  -      public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public String getScrolling()
  -    {
  -        return capitalize( getAttribute( "scrolling" ) );
  -    }
  -    
  -    
  -    public void setScrolling( String scrolling )
  -    {
  -        setAttribute( "scrolling", scrolling );
  -    }
  -    
  -  
  -       public String getSrc()
  -    {
  -        return getAttribute( "src" );
  -    }
  -    
  -    
  -    public void setSrc( String src )
  -    {
  -        setAttribute( "src", src );
  -    }
  -
  -
  -      public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLIFrameElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:53 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLIFrameElement
  + * @see ElementImpl
  + */
  +public class HTMLIFrameElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLIFrameElement
  +{
  +
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getFrameBorder()
  +    {
  +        return getAttribute( "frameborder" );
  +    }
  +    
  +    
  +    public void setFrameBorder( String frameBorder )
  +    {
  +        setAttribute( "frameborder", frameBorder );
  +    }
  +
  +    
  +    public String getHeight()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHeight( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +  
  +    public String getLongDesc()
  +    {
  +        return getAttribute( "longdesc" );
  +    }
  +    
  +    
  +    public void setLongDesc( String longDesc )
  +    {
  +        setAttribute( "longdesc", longDesc );
  +    }
  +  
  +  
  +    public String getMarginHeight()
  +    {
  +        return getAttribute( "marginheight" );
  +    }
  +    
  +    
  +    public void setMarginHeight( String marginHeight )
  +    {
  +        setAttribute( "marginheight", marginHeight );
  +    }
  +  
  +  
  +    public String getMarginWidth()
  +    {
  +        return getAttribute( "marginwidth" );
  +    }
  +    
  +    
  +    public void setMarginWidth( String marginWidth )
  +    {
  +        setAttribute( "marginwidth", marginWidth );
  +    }
  +
  +  
  +      public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public String getScrolling()
  +    {
  +        return capitalize( getAttribute( "scrolling" ) );
  +    }
  +    
  +    
  +    public void setScrolling( String scrolling )
  +    {
  +        setAttribute( "scrolling", scrolling );
  +    }
  +    
  +  
  +       public String getSrc()
  +    {
  +        return getAttribute( "src" );
  +    }
  +    
  +    
  +    public void setSrc( String src )
  +    {
  +        setAttribute( "src", src );
  +    }
  +
  +
  +      public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLIFrameElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +188 -188  xml-xerces/java/src/org/apache/html/dom/HTMLImageElementImpl.java
  
  Index: HTMLImageElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLImageElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLImageElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLImageElementImpl.java	2001/02/14 18:28:53	1.2.4.1
  @@ -54,191 +54,191 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLImageElement
  - * @see ElementImpl
  - */
  -public final class HTMLImageElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLImageElement
  -{
  -
  -    
  -       public String getLowSrc()
  -    {
  -        return getAttribute( "lowsrc" );
  -    }
  -    
  -    
  -    public void setLowSrc( String lowSrc )
  -    {
  -        setAttribute( "lowsrc", lowSrc );
  -    }
  -
  -  
  -       public String getSrc()
  -    {
  -        return getAttribute( "src" );
  -    }
  -    
  -    
  -    public void setSrc( String src )
  -    {
  -        setAttribute( "src", src );
  -    }
  -
  -    
  -      public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getAlt()
  -    {
  -        return getAttribute( "alt" );
  -    }
  -    
  -    
  -    public void setAlt( String alt )
  -    {
  -        setAttribute( "alt", alt );
  -    }
  -
  -    
  -    public String getBorder()
  -    {
  -        return getAttribute( "border" );
  -    }
  -    
  -    
  -    public void setBorder( String border )
  -    {
  -        setAttribute( "border", border );
  -    }
  -
  -  
  -      public String getHeight()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHeight( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -
  -    
  -    public String getHspace()
  -    {
  -        return getAttribute( "hspace" );
  -    }
  -    
  -    
  -    public void setHspace( String hspace )
  -    {
  -        setAttribute( "hspace", hspace );
  -    }
  -    
  -  
  -    public boolean getIsMap()
  -    {
  -        return getBinary( "ismap" );
  -    }
  -    
  -    
  -    public void setIsMap( boolean isMap )
  -    {
  -        setAttribute( "ismap", isMap );
  -    }
  -
  -    
  -    public String getLongDesc()
  -    {
  -        return getAttribute( "longdesc" );
  -    }
  -    
  -    
  -    public void setLongDesc( String longDesc )
  -    {
  -        setAttribute( "longdesc", longDesc );
  -    }
  -    
  -  
  -    public String getUseMap()
  -    {
  -        return getAttribute( "useMap" );
  -    }
  -    
  -    
  -    public void setUseMap( String useMap )
  -    {
  -        setAttribute( "useMap", useMap );
  -    }
  -    
  -
  -    public String getVspace()
  -    {
  -        return getAttribute( "vspace" );
  -    }
  -    
  -    
  -    public void setVspace( String vspace )
  -    {
  -        setAttribute( "vspace", vspace );
  -    }
  -
  -  
  -      public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLImageElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:53 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLImageElement
  + * @see ElementImpl
  + */
  +public class HTMLImageElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLImageElement
  +{
  +
  +    
  +       public String getLowSrc()
  +    {
  +        return getAttribute( "lowsrc" );
  +    }
  +    
  +    
  +    public void setLowSrc( String lowSrc )
  +    {
  +        setAttribute( "lowsrc", lowSrc );
  +    }
  +
  +  
  +       public String getSrc()
  +    {
  +        return getAttribute( "src" );
  +    }
  +    
  +    
  +    public void setSrc( String src )
  +    {
  +        setAttribute( "src", src );
  +    }
  +
  +    
  +      public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getAlt()
  +    {
  +        return getAttribute( "alt" );
  +    }
  +    
  +    
  +    public void setAlt( String alt )
  +    {
  +        setAttribute( "alt", alt );
  +    }
  +
  +    
  +    public String getBorder()
  +    {
  +        return getAttribute( "border" );
  +    }
  +    
  +    
  +    public void setBorder( String border )
  +    {
  +        setAttribute( "border", border );
  +    }
  +
  +  
  +      public String getHeight()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHeight( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +
  +    
  +    public String getHspace()
  +    {
  +        return getAttribute( "hspace" );
  +    }
  +    
  +    
  +    public void setHspace( String hspace )
  +    {
  +        setAttribute( "hspace", hspace );
  +    }
  +    
  +  
  +    public boolean getIsMap()
  +    {
  +        return getBinary( "ismap" );
  +    }
  +    
  +    
  +    public void setIsMap( boolean isMap )
  +    {
  +        setAttribute( "ismap", isMap );
  +    }
  +
  +    
  +    public String getLongDesc()
  +    {
  +        return getAttribute( "longdesc" );
  +    }
  +    
  +    
  +    public void setLongDesc( String longDesc )
  +    {
  +        setAttribute( "longdesc", longDesc );
  +    }
  +    
  +  
  +    public String getUseMap()
  +    {
  +        return getAttribute( "useMap" );
  +    }
  +    
  +    
  +    public void setUseMap( String useMap )
  +    {
  +        setAttribute( "useMap", useMap );
  +    }
  +    
  +
  +    public String getVspace()
  +    {
  +        return getAttribute( "vspace" );
  +    }
  +    
  +    
  +    public void setVspace( String vspace )
  +    {
  +        setAttribute( "vspace", vspace );
  +    }
  +
  +  
  +      public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLImageElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +275 -275  xml-xerces/java/src/org/apache/html/dom/HTMLInputElementImpl.java
  
  Index: HTMLInputElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLInputElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLInputElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLInputElementImpl.java	2001/02/14 18:28:53	1.2.4.1
  @@ -54,278 +54,278 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLInputElement
  - * @see ElementImpl
  - */
  -public final class HTMLInputElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLInputElement, HTMLFormControl
  -{
  -    
  -    
  -    public String getDefaultValue()
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        return getAttribute( "defaultValue" );
  -    }
  -    
  -    
  -    public void setDefaultValue( String defaultValue )
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        setAttribute( "defaultValue", defaultValue );
  -    }
  -    
  -    
  -    public boolean getDefaultChecked()
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        return getBinary( "defaultChecked" );
  -    }
  -    
  -    
  -    public void setDefaultChecked( boolean defaultChecked )
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        setAttribute( "defaultChecked", defaultChecked );
  -    }
  -  
  -    
  -    public String getAccept()
  -    {
  -        return getAttribute( "accept" );
  -    }
  -    
  -    
  -    public void setAccept( String accept )
  -    {
  -        setAttribute( "accept", accept );
  -    }   
  -    
  -    
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.    
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -    
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -    
  -    
  -    public String getAlt()
  -    {
  -        return getAttribute( "alt" );
  -    }
  -    
  -    
  -    public void setAlt( String alt )
  -    {
  -        setAttribute( "alt", alt );
  -    }
  -    
  -    
  -    public boolean getChecked()
  -    {
  -        return getBinary( "checked" );
  -    }
  -    
  -    
  -    public void setChecked( boolean checked )
  -    {
  -        setAttribute( "checked", checked );
  -    }
  -  
  -    
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -    
  -    
  -    public int getMaxLength()
  -    {
  -        return getInteger( getAttribute( "maxlength" ) );
  -    }
  -    
  -    
  -    public void setMaxLength( int maxLength )
  -    {
  -        setAttribute( "maxlength", String.valueOf( maxLength ) );
  -    }
  -    
  -    
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -    
  -    
  -    public boolean getReadOnly()
  -    {
  -        return getBinary( "readonly" );
  -    }
  -    
  -    
  -    public void setReadOnly( boolean readOnly )
  -    {
  -        setAttribute( "readonly", readOnly );
  -    }
  -    
  -    
  -    public String getSize()
  -    {
  -        return getAttribute( "size" );
  -    }
  -    
  -    
  -    public void setSize( String size )
  -    {
  -        setAttribute( "size", size );
  -    }
  -    
  -    
  -    public String getSrc()
  -    {
  -        return getAttribute( "src" );
  -    }
  -    
  -    
  -    public void setSrc( String src )
  -    {
  -        setAttribute( "src", src );
  -    }
  -    
  -    
  -      public int getTabIndex()
  -    {
  -        try
  -        {
  -            return Integer.parseInt( getAttribute( "tabindex" ) );
  -        }
  -        catch ( NumberFormatException except )
  -        {
  -            return 0;
  -        }
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public String getUseMap()
  -    {
  -        return getAttribute( "useMap" );
  -    }
  -    
  -    
  -    public void setUseMap( String useMap )
  -    {
  -        setAttribute( "useMap", useMap );
  -    }
  -    
  -    
  -    public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -    
  -    
  -    public void blur()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    
  -    public void focus()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    
  -    public void select()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    
  -    public void click()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -
  -  
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLInputElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:53 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLInputElement
  + * @see ElementImpl
  + */
  +public class HTMLInputElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLInputElement, HTMLFormControl
  +{
  +    
  +    
  +    public String getDefaultValue()
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        return getAttribute( "defaultValue" );
  +    }
  +    
  +    
  +    public void setDefaultValue( String defaultValue )
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        setAttribute( "defaultValue", defaultValue );
  +    }
  +    
  +    
  +    public boolean getDefaultChecked()
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        return getBinary( "defaultChecked" );
  +    }
  +    
  +    
  +    public void setDefaultChecked( boolean defaultChecked )
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        setAttribute( "defaultChecked", defaultChecked );
  +    }
  +  
  +    
  +    public String getAccept()
  +    {
  +        return getAttribute( "accept" );
  +    }
  +    
  +    
  +    public void setAccept( String accept )
  +    {
  +        setAttribute( "accept", accept );
  +    }   
  +    
  +    
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.    
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +    
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +    
  +    
  +    public String getAlt()
  +    {
  +        return getAttribute( "alt" );
  +    }
  +    
  +    
  +    public void setAlt( String alt )
  +    {
  +        setAttribute( "alt", alt );
  +    }
  +    
  +    
  +    public boolean getChecked()
  +    {
  +        return getBinary( "checked" );
  +    }
  +    
  +    
  +    public void setChecked( boolean checked )
  +    {
  +        setAttribute( "checked", checked );
  +    }
  +  
  +    
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +    
  +    
  +    public int getMaxLength()
  +    {
  +        return getInteger( getAttribute( "maxlength" ) );
  +    }
  +    
  +    
  +    public void setMaxLength( int maxLength )
  +    {
  +        setAttribute( "maxlength", String.valueOf( maxLength ) );
  +    }
  +    
  +    
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +    
  +    
  +    public boolean getReadOnly()
  +    {
  +        return getBinary( "readonly" );
  +    }
  +    
  +    
  +    public void setReadOnly( boolean readOnly )
  +    {
  +        setAttribute( "readonly", readOnly );
  +    }
  +    
  +    
  +    public String getSize()
  +    {
  +        return getAttribute( "size" );
  +    }
  +    
  +    
  +    public void setSize( String size )
  +    {
  +        setAttribute( "size", size );
  +    }
  +    
  +    
  +    public String getSrc()
  +    {
  +        return getAttribute( "src" );
  +    }
  +    
  +    
  +    public void setSrc( String src )
  +    {
  +        setAttribute( "src", src );
  +    }
  +    
  +    
  +      public int getTabIndex()
  +    {
  +        try
  +        {
  +            return Integer.parseInt( getAttribute( "tabindex" ) );
  +        }
  +        catch ( NumberFormatException except )
  +        {
  +            return 0;
  +        }
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public String getUseMap()
  +    {
  +        return getAttribute( "useMap" );
  +    }
  +    
  +    
  +    public void setUseMap( String useMap )
  +    {
  +        setAttribute( "useMap", useMap );
  +    }
  +    
  +    
  +    public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +    
  +    
  +    public void blur()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    
  +    public void focus()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    
  +    public void select()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    
  +    public void click()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +
  +  
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLInputElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLIsIndexElementImpl.java
  
  Index: HTMLIsIndexElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLIsIndexElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLIsIndexElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLIsIndexElementImpl.java	2001/02/14 18:28:54	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLIsIndexElement
  - * @see ElementImpl
  - */
  -public final class HTMLIsIndexElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLIsIndexElement
  -{
  -
  -    
  -    public String getPrompt()
  -    {
  -        return getAttribute( "prompt" );
  -    }
  -    
  -    
  -    public void setPrompt( String prompt )
  -    {
  -        setAttribute( "prompt", prompt );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLIsIndexElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:54 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLIsIndexElement
  + * @see ElementImpl
  + */
  +public class HTMLIsIndexElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLIsIndexElement
  +{
  +
  +    
  +    public String getPrompt()
  +    {
  +        return getAttribute( "prompt" );
  +    }
  +    
  +    
  +    public void setPrompt( String prompt )
  +    {
  +        setAttribute( "prompt", prompt );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLIsIndexElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +56 -56    xml-xerces/java/src/org/apache/html/dom/HTMLLIElementImpl.java
  
  Index: HTMLLIElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLLIElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLLIElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLLIElementImpl.java	2001/02/14 18:28:54	1.2.4.1
  @@ -54,59 +54,59 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLLIElement
  - * @see ElementImpl
  - */
  -public final class HTMLLIElementImpl
  -    extends HTMLElementImpl
  -	    implements HTMLLIElement
  -{
  -
  -    
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -        
  -
  -    public int getValue()
  -    {
  -        return getInteger( getAttribute( "value" ) );
  -    }
  -
  -    
  -    public void setValue( int value )
  -    {
  -        setAttribute( "value", String.valueOf( value ) );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLLIElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:54 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLLIElement
  + * @see ElementImpl
  + */
  +public class HTMLLIElementImpl
  +    extends HTMLElementImpl
  +	    implements HTMLLIElement
  +{
  +
  +    
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +        
  +
  +    public int getValue()
  +    {
  +        return getInteger( getAttribute( "value" ) );
  +    }
  +
  +    
  +    public void setValue( int value )
  +    {
  +        setAttribute( "value", String.valueOf( value ) );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLLIElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +65 -65    xml-xerces/java/src/org/apache/html/dom/HTMLLabelElementImpl.java
  
  Index: HTMLLabelElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLLabelElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLLabelElementImpl.java	2000/02/10 04:00:10	1.2
  +++ HTMLLabelElementImpl.java	2001/02/14 18:28:54	1.2.4.1
  @@ -54,68 +54,68 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:10 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLLabelElement
  - * @see ElementImpl
  - */
  -public final class HTMLLabelElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLLabelElement, HTMLFormControl
  -{
  -
  -    
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -       public String getHtmlFor()
  -    {
  -        return getAttribute( "for" );
  -    }
  -    
  -    
  -    public void setHtmlFor( String htmlFor )
  -    {
  -        setAttribute( "for", htmlFor );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLLabelElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:54 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLLabelElement
  + * @see ElementImpl
  + */
  +public class HTMLLabelElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLLabelElement, HTMLFormControl
  +{
  +
  +    
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +       public String getHtmlFor()
  +    {
  +        return getAttribute( "for" );
  +    }
  +    
  +    
  +    public void setHtmlFor( String htmlFor )
  +    {
  +        setAttribute( "for", htmlFor );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLLabelElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +65 -65    xml-xerces/java/src/org/apache/html/dom/HTMLLegendElementImpl.java
  
  Index: HTMLLegendElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLLegendElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLLegendElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLLegendElementImpl.java	2001/02/14 18:28:55	1.2.4.1
  @@ -54,68 +54,68 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLLegendElement
  - * @see ElementImpl
  - */
  -public final class HTMLLegendElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLLegendElement
  -{
  -
  -    
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -    public String getAlign()
  -    {
  -        return getAttribute( "align" );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLLegendElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:55 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLLegendElement
  + * @see ElementImpl
  + */
  +public class HTMLLegendElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLLegendElement
  +{
  +
  +    
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +    public String getAlign()
  +    {
  +        return getAttribute( "align" );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLLegendElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +140 -140  xml-xerces/java/src/org/apache/html/dom/HTMLLinkElementImpl.java
  
  Index: HTMLLinkElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLLinkElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLLinkElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLLinkElementImpl.java	2001/02/14 18:28:55	1.2.4.1
  @@ -54,143 +54,143 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLLinkElement
  - * @see ElementImpl
  - */
  -public final class HTMLLinkElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLLinkElement
  -{
  -
  -    
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -    public String getCharset()
  -    {
  -        return getAttribute( "charset" );
  -    }
  -    
  -    
  -    public void setCharset( String charset )
  -    {
  -        setAttribute( "charset", charset );
  -    }
  -    
  -    
  -    public String getHref()
  -    {
  -        return getAttribute( "href" );
  -    }
  -    
  -    
  -    public void setHref( String href )
  -    {
  -        setAttribute( "href", href );
  -    }
  -    
  -    
  -    public String getHreflang()
  -    {
  -        return getAttribute( "hreflang" );
  -    }
  -    
  -    
  -    public void setHreflang( String hreflang )
  -    {
  -        setAttribute( "hreflang", hreflang );
  -    }
  -
  -    
  -    public String getMedia()
  -    {
  -        return getAttribute( "media" );
  -    }
  -    
  -    
  -    public void setMedia( String media )
  -    {
  -        setAttribute( "media", media );
  -    }
  -
  -  
  -    public String getRel()
  -    {
  -        return getAttribute( "rel" );
  -    }
  -    
  -    
  -    public void setRel( String rel )
  -    {
  -        setAttribute( "rel", rel );
  -    }
  -    
  -    
  -    public String getRev()
  -    {
  -        return getAttribute( "rev" );
  -    }
  -    
  -    
  -    public void setRev( String rev )
  -    {
  -        setAttribute( "rev", rev );
  -    }
  -
  -    
  -    public String getTarget()
  -    {
  -        return getAttribute( "target" );
  -    }
  -    
  -    
  -    public void setTarget( String target )
  -    {
  -        setAttribute( "target", target );
  -    }
  -  
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLLinkElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:55 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLLinkElement
  + * @see ElementImpl
  + */
  +public class HTMLLinkElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLLinkElement
  +{
  +
  +    
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +    public String getCharset()
  +    {
  +        return getAttribute( "charset" );
  +    }
  +    
  +    
  +    public void setCharset( String charset )
  +    {
  +        setAttribute( "charset", charset );
  +    }
  +    
  +    
  +    public String getHref()
  +    {
  +        return getAttribute( "href" );
  +    }
  +    
  +    
  +    public void setHref( String href )
  +    {
  +        setAttribute( "href", href );
  +    }
  +    
  +    
  +    public String getHreflang()
  +    {
  +        return getAttribute( "hreflang" );
  +    }
  +    
  +    
  +    public void setHreflang( String hreflang )
  +    {
  +        setAttribute( "hreflang", hreflang );
  +    }
  +
  +    
  +    public String getMedia()
  +    {
  +        return getAttribute( "media" );
  +    }
  +    
  +    
  +    public void setMedia( String media )
  +    {
  +        setAttribute( "media", media );
  +    }
  +
  +  
  +    public String getRel()
  +    {
  +        return getAttribute( "rel" );
  +    }
  +    
  +    
  +    public void setRel( String rel )
  +    {
  +        setAttribute( "rel", rel );
  +    }
  +    
  +    
  +    public String getRev()
  +    {
  +        return getAttribute( "rev" );
  +    }
  +    
  +    
  +    public void setRev( String rev )
  +    {
  +        setAttribute( "rev", rev );
  +    }
  +
  +    
  +    public String getTarget()
  +    {
  +        return getAttribute( "target" );
  +    }
  +    
  +    
  +    public void setTarget( String target )
  +    {
  +        setAttribute( "target", target );
  +    }
  +  
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLLinkElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +56 -56    xml-xerces/java/src/org/apache/html/dom/HTMLMapElementImpl.java
  
  Index: HTMLMapElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLMapElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLMapElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLMapElementImpl.java	2001/02/14 18:28:55	1.2.4.1
  @@ -54,59 +54,59 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLMapElement
  - * @see ElementImpl
  - */
  -public final class HTMLMapElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLMapElement
  -{
  -
  -    
  -    
  -    public HTMLCollection getAreas()
  -    {
  -        if ( _areas == null )
  -            _areas = new HTMLCollectionImpl( this, HTMLCollectionImpl.AREA );
  -        return _areas;
  -    }
  -    
  -  
  -      public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLMapElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -    
  -    
  -    private HTMLCollection    _areas;
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:55 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLMapElement
  + * @see ElementImpl
  + */
  +public class HTMLMapElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLMapElement
  +{
  +
  +    
  +    
  +    public HTMLCollection getAreas()
  +    {
  +        if ( _areas == null )
  +            _areas = new HTMLCollectionImpl( this, HTMLCollectionImpl.AREA );
  +        return _areas;
  +    }
  +    
  +  
  +      public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLMapElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +    
  +    
  +    private HTMLCollection    _areas;
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLMenuElementImpl.java
  
  Index: HTMLMenuElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLMenuElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLMenuElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLMenuElementImpl.java	2001/02/14 18:28:55	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLMenuElement
  - * @see ElementImpl
  - */
  -public final class HTMLMenuElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLMenuElement
  -{
  -
  -    
  -    public boolean getCompact()
  -    {
  -        return getBinary( "compact" );
  -    }
  -    
  -    
  -    public void setCompact( boolean compact )
  -    {
  -        setAttribute( "compact", compact );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLMenuElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:55 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLMenuElement
  + * @see ElementImpl
  + */
  +public class HTMLMenuElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLMenuElement
  +{
  +
  +    
  +    public boolean getCompact()
  +    {
  +        return getBinary( "compact" );
  +    }
  +    
  +    
  +    public void setCompact( boolean compact )
  +    {
  +        setAttribute( "compact", compact );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLMenuElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +81 -81    xml-xerces/java/src/org/apache/html/dom/HTMLMetaElementImpl.java
  
  Index: HTMLMetaElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLMetaElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLMetaElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLMetaElementImpl.java	2001/02/14 18:28:56	1.2.4.1
  @@ -54,84 +54,84 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLMetaElement
  - * @see ElementImpl
  - */
  -public final class HTMLMetaElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLMetaElement
  -{
  -
  -    
  -    public String getContent()
  -    {
  -        return getAttribute( "content" );
  -    }
  -    
  -    
  -    public void setContent( String content )
  -    {
  -        setAttribute( "content", content );
  -    }
  -
  -    
  -    
  -      public String getHttpEquiv()
  -    {
  -        return getAttribute( "http-equiv" );
  -    }
  -    
  -    
  -    public void setHttpEquiv( String httpEquiv )
  -    {
  -        setAttribute( "http-equiv", httpEquiv );
  -    }
  -
  -  
  -      public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -      public String getScheme()
  -    {
  -        return getAttribute( "scheme" );
  -    }
  -    
  -    
  -    public void setScheme( String scheme )
  -    {
  -        setAttribute( "scheme", scheme );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLMetaElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:56 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLMetaElement
  + * @see ElementImpl
  + */
  +public class HTMLMetaElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLMetaElement
  +{
  +
  +    
  +    public String getContent()
  +    {
  +        return getAttribute( "content" );
  +    }
  +    
  +    
  +    public void setContent( String content )
  +    {
  +        setAttribute( "content", content );
  +    }
  +
  +    
  +    
  +      public String getHttpEquiv()
  +    {
  +        return getAttribute( "http-equiv" );
  +    }
  +    
  +    
  +    public void setHttpEquiv( String httpEquiv )
  +    {
  +        setAttribute( "http-equiv", httpEquiv );
  +    }
  +
  +  
  +      public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +      public String getScheme()
  +    {
  +        return getAttribute( "scheme" );
  +    }
  +    
  +    
  +    public void setScheme( String scheme )
  +    {
  +        setAttribute( "scheme", scheme );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLMetaElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +57 -57    xml-xerces/java/src/org/apache/html/dom/HTMLModElementImpl.java
  
  Index: HTMLModElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLModElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLModElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLModElementImpl.java	2001/02/14 18:28:56	1.2.4.1
  @@ -54,60 +54,60 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLModElement
  - * @see ElementImpl
  - */
  -public final class HTMLModElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLModElement
  -{
  -
  -    
  -    
  -    public String getCite()
  -    {
  -        return getAttribute( "cite" );
  -    }
  -    
  -    
  -    public void setCite( String cite )
  -    {
  -        setAttribute( "cite", cite );
  -    }
  -    
  -    
  -      public String getDateTime()
  -    {
  -        return getAttribute( "datetime" );
  -    }
  -    
  -    
  -    public void setDateTime( String dateTime )
  -    {
  -        setAttribute( "datetime", dateTime );
  -    }
  -    
  -
  -    /**
  -     * Constructor requires owner document and tag name.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLModElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:56 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLModElement
  + * @see ElementImpl
  + */
  +public class HTMLModElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLModElement
  +{
  +
  +    
  +    
  +    public String getCite()
  +    {
  +        return getAttribute( "cite" );
  +    }
  +    
  +    
  +    public void setCite( String cite )
  +    {
  +        setAttribute( "cite", cite );
  +    }
  +    
  +    
  +      public String getDateTime()
  +    {
  +        return getAttribute( "datetime" );
  +    }
  +    
  +    
  +    public void setDateTime( String dateTime )
  +    {
  +        setAttribute( "datetime", dateTime );
  +    }
  +    
  +
  +    /**
  +     * Constructor requires owner document and tag name.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLModElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +68 -68    xml-xerces/java/src/org/apache/html/dom/HTMLOListElementImpl.java
  
  Index: HTMLOListElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLOListElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLOListElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLOListElementImpl.java	2001/02/14 18:28:56	1.2.4.1
  @@ -54,71 +54,71 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLOListElement
  - * @see ElementImpl
  - */
  -public final class HTMLOListElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLOListElement
  -{
  -
  -    
  -    public boolean getCompact()
  -    {
  -        return getBinary( "compact" );
  -    }
  -    
  -    
  -    public void setCompact( boolean compact )
  -    {
  -        setAttribute( "compact", compact );
  -    }
  -    
  -    
  -      public int getStart()
  -    {
  -        return getInteger( getAttribute( "start" ) );
  -    }
  -    
  -    
  -    public void setStart( int start )
  -    {
  -        setAttribute( "start", String.valueOf( start ) );
  -    }
  -  
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -        
  -        
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLOListElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:56 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLOListElement
  + * @see ElementImpl
  + */
  +public class HTMLOListElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLOListElement
  +{
  +
  +    
  +    public boolean getCompact()
  +    {
  +        return getBinary( "compact" );
  +    }
  +    
  +    
  +    public void setCompact( boolean compact )
  +    {
  +        setAttribute( "compact", compact );
  +    }
  +    
  +    
  +      public int getStart()
  +    {
  +        return getInteger( getAttribute( "start" ) );
  +    }
  +    
  +    
  +    public void setStart( int start )
  +    {
  +        setAttribute( "start", String.valueOf( start ) );
  +    }
  +  
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +        
  +        
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLOListElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +241 -241  xml-xerces/java/src/org/apache/html/dom/HTMLObjectElementImpl.java
  
  Index: HTMLObjectElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLObjectElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLObjectElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLObjectElementImpl.java	2001/02/14 18:28:56	1.2.4.1
  @@ -54,244 +54,244 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLObjectElement
  - * @see ElementImpl
  - */
  -public final class HTMLObjectElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLObjectElement, HTMLFormControl
  -{
  -    
  -    
  -
  -    public String getCode()
  -    {
  -        return getAttribute( "code" );
  -    }
  -    
  -    
  -    public void setCode( String code )
  -    {
  -        setAttribute( "code", code );
  -    }
  -
  -  
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getArchive()
  -    {
  -        return getAttribute( "archive" );
  -    }
  -    
  -    
  -    public void setArchive( String archive )
  -    {
  -        setAttribute( "archive", archive );
  -    }
  -    
  -    public String getBorder()
  -    {
  -        return getAttribute( "border" );
  -    }
  -    
  -    
  -    public void setBorder( String border )
  -    {
  -        setAttribute( "border", border );
  -    }
  -
  -    
  -    public String getCodeBase()
  -    {
  -        return getAttribute( "codebase" );
  -    }
  -    
  -    
  -    public void setCodeBase( String codeBase )
  -    {
  -        setAttribute( "codebase", codeBase );
  -    }
  -
  -    
  -    public String getCodeType()
  -    {
  -        return getAttribute( "codetype" );
  -    }
  -    
  -    
  -    public void setCodeType( String codeType )
  -    {
  -        setAttribute( "codetype", codeType );
  -    }
  -
  -    
  -    public String getData()
  -    {
  -        return getAttribute( "data" );
  -    }
  -    
  -    
  -    public void setData( String data )
  -    {
  -        setAttribute( "data", data );
  -    }
  -
  -  
  -      public boolean getDeclare()
  -    {
  -        return getBinary( "declare" );
  -    }
  -    
  -    
  -    public void setDeclare( boolean declare )
  -    {
  -        setAttribute( "declare", declare );
  -    }
  -
  -    
  -    public String getHeight()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHeight( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -
  -    
  -    public String getHspace()
  -    {
  -        return getAttribute( "hspace" );
  -    }
  -    
  -    
  -    public void setHspace( String hspace )
  -    {
  -        setAttribute( "hspace", hspace );
  -    }
  -  
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public String getStandby()
  -    {
  -        return getAttribute( "standby" );
  -    }
  -    
  -    
  -    public void setStandby( String standby )
  -    {
  -        setAttribute( "standby", standby );
  -    }
  -  
  -      public int getTabIndex()
  -    {
  -        try
  -        {
  -            return Integer.parseInt( getAttribute( "tabindex" ) );
  -        }
  -        catch ( NumberFormatException except )
  -        {
  -            return 0;
  -        }
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -    
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -    public String getUseMap()
  -    {
  -        return getAttribute( "useMap" );
  -    }
  -    
  -    
  -    public void setUseMap( String useMap )
  -    {
  -        setAttribute( "useMap", useMap );
  -    }
  -    
  -    
  -    public String getVspace()
  -    {
  -        return getAttribute( "vspace" );
  -    }
  -    
  -    
  -    public void setVspace( String vspace )
  -    {
  -        setAttribute( "vspace", vspace );
  -    }
  -
  -  
  -    public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLObjectElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:56 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLObjectElement
  + * @see ElementImpl
  + */
  +public class HTMLObjectElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLObjectElement, HTMLFormControl
  +{
  +    
  +    
  +
  +    public String getCode()
  +    {
  +        return getAttribute( "code" );
  +    }
  +    
  +    
  +    public void setCode( String code )
  +    {
  +        setAttribute( "code", code );
  +    }
  +
  +  
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getArchive()
  +    {
  +        return getAttribute( "archive" );
  +    }
  +    
  +    
  +    public void setArchive( String archive )
  +    {
  +        setAttribute( "archive", archive );
  +    }
  +    
  +    public String getBorder()
  +    {
  +        return getAttribute( "border" );
  +    }
  +    
  +    
  +    public void setBorder( String border )
  +    {
  +        setAttribute( "border", border );
  +    }
  +
  +    
  +    public String getCodeBase()
  +    {
  +        return getAttribute( "codebase" );
  +    }
  +    
  +    
  +    public void setCodeBase( String codeBase )
  +    {
  +        setAttribute( "codebase", codeBase );
  +    }
  +
  +    
  +    public String getCodeType()
  +    {
  +        return getAttribute( "codetype" );
  +    }
  +    
  +    
  +    public void setCodeType( String codeType )
  +    {
  +        setAttribute( "codetype", codeType );
  +    }
  +
  +    
  +    public String getData()
  +    {
  +        return getAttribute( "data" );
  +    }
  +    
  +    
  +    public void setData( String data )
  +    {
  +        setAttribute( "data", data );
  +    }
  +
  +  
  +      public boolean getDeclare()
  +    {
  +        return getBinary( "declare" );
  +    }
  +    
  +    
  +    public void setDeclare( boolean declare )
  +    {
  +        setAttribute( "declare", declare );
  +    }
  +
  +    
  +    public String getHeight()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHeight( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +
  +    
  +    public String getHspace()
  +    {
  +        return getAttribute( "hspace" );
  +    }
  +    
  +    
  +    public void setHspace( String hspace )
  +    {
  +        setAttribute( "hspace", hspace );
  +    }
  +  
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public String getStandby()
  +    {
  +        return getAttribute( "standby" );
  +    }
  +    
  +    
  +    public void setStandby( String standby )
  +    {
  +        setAttribute( "standby", standby );
  +    }
  +  
  +      public int getTabIndex()
  +    {
  +        try
  +        {
  +            return Integer.parseInt( getAttribute( "tabindex" ) );
  +        }
  +        catch ( NumberFormatException except )
  +        {
  +            return 0;
  +        }
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +    
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +    public String getUseMap()
  +    {
  +        return getAttribute( "useMap" );
  +    }
  +    
  +    
  +    public void setUseMap( String useMap )
  +    {
  +        setAttribute( "useMap", useMap );
  +    }
  +    
  +    
  +    public String getVspace()
  +    {
  +        return getAttribute( "vspace" );
  +    }
  +    
  +    
  +    public void setVspace( String vspace )
  +    {
  +        setAttribute( "vspace", vspace );
  +    }
  +
  +  
  +    public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLObjectElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +56 -56    xml-xerces/java/src/org/apache/html/dom/HTMLOptGroupElementImpl.java
  
  Index: HTMLOptGroupElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLOptGroupElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLOptGroupElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLOptGroupElementImpl.java	2001/02/14 18:28:57	1.2.4.1
  @@ -54,59 +54,59 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLOptGroupElement
  - * @see ElementImpl
  - */
  -public final class HTMLOptGroupElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLOptGroupElement
  -{
  -
  -        
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -      public String getLabel()
  -    {
  -        return capitalize( getAttribute( "label" ) );
  -    }
  -    
  -    
  -    public void setLabel( String label )
  -    {
  -        setAttribute( "label", label );
  -    }
  -
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLOptGroupElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:57 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLOptGroupElement
  + * @see ElementImpl
  + */
  +public class HTMLOptGroupElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLOptGroupElement
  +{
  +
  +        
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +      public String getLabel()
  +    {
  +        return capitalize( getAttribute( "label" ) );
  +    }
  +    
  +    
  +    public void setLabel( String label )
  +    {
  +        setAttribute( "label", label );
  +    }
  +
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLOptGroupElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +190 -190  xml-xerces/java/src/org/apache/html/dom/HTMLOptionElementImpl.java
  
  Index: HTMLOptionElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLOptionElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLOptionElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLOptionElementImpl.java	2001/02/14 18:28:57	1.2.4.1
  @@ -54,193 +54,193 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLOptionElement
  - * @see ElementImpl
  - */
  -public final class HTMLOptionElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLOptionElement
  -{
  -
  -    
  -
  -    public boolean getDefaultSelected()
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        return getBinary( "default-selected" );
  -    }
  -    
  -    
  -    public void setDefaultSelected( boolean defaultSelected )
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        setAttribute( "default-selected", defaultSelected );
  -    }
  -
  -  
  -    public String getText()
  -    {
  -        Node    child;
  -        String    text;
  -        
  -        // Find the Text nodes contained within this element and return their
  -        // concatenated value. Required to go around comments, entities, etc.
  -        child = getFirstChild();
  -        text = "";
  -        while ( child != null )
  -        {
  -            if ( child instanceof Text )
  -                text = text + ( (Text) child ).getData();
  -            child = child.getNextSibling();
  -        }
  -        return text;
  -    }
  -    
  -    
  -    public void setText( String text )
  -    {
  -        Node    child;
  -        Node    next;
  -        
  -        // Delete all the nodes and replace them with a single Text node.
  -        // This is the only approach that can handle comments and other nodes.
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            next = child.getNextSibling();
  -            removeChild( child );
  -            child = next;
  -        }
  -        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  -    }
  -    
  -    
  -    public int getIndex()
  -    {
  -        Node        parent;
  -        NodeList    options;
  -        int            i;
  -        
  -        // Locate the parent SELECT. Note that this OPTION might be inside a
  -        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
  -        // Everything is possible. If no parent is found, return -1.
  -        parent = getParentNode();
  -        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
  -            parent = parent.getParentNode();
  -        if ( parent != null )
  -        {
  -            // Use getElementsByTagName() which creates a snapshot of all the
  -            // OPTION elements under the SELECT. Access to the returned NodeList
  -            // is very fast and the snapshot solves many synchronization problems.
  -            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
  -            for ( i = 0 ; i < options.getLength() ; ++i )
  -                if ( options.item( i ) == this )
  -                    return i;
  -        }
  -        return -1;
  -    }
  -    
  -    
  -    public void setIndex( int index )
  -    {
  -        Node        parent;
  -        NodeList    options;
  -        Node        item;
  -        
  -        // Locate the parent SELECT. Note that this OPTION might be inside a
  -        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
  -        // Everything is possible. If no parent is found, just return.
  -        parent = getParentNode();
  -        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
  -            parent = parent.getParentNode();
  -        if ( parent != null )
  -        {
  -            // Use getElementsByTagName() which creates a snapshot of all the
  -            // OPTION elements under the SELECT. Access to the returned NodeList
  -            // is very fast and the snapshot solves many synchronization problems.
  -            // Make sure this OPTION is not replacing itself.
  -            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
  -            if ( options.item( index ) != this )
  -            {
  -                // Remove this OPTION from its parent. Place this OPTION right
  -                // before indexed OPTION underneath it's direct parent (might
  -                // be an OPTGROUP).
  -                getParentNode().removeChild( this );
  -                item = options.item( index );
  -                item.getParentNode().insertBefore( this, item );
  -            }
  -        }
  -    }
  -  
  -  
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -      public String getLabel()
  -    {
  -        return capitalize( getAttribute( "label" ) );
  -    }
  -    
  -    
  -    public void setLabel( String label )
  -    {
  -        setAttribute( "label", label );
  -    }
  -
  -    
  -    public boolean getSelected()
  -    {
  -        return getBinary( "selected" );
  -    }
  -  
  -  
  -    public void setSelected( boolean selected )
  -    {
  -        setAttribute( "selected", selected );
  -    }
  -    
  -        
  -    public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLOptionElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:57 $
  + * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLOptionElement
  + * @see ElementImpl
  + */
  +public class HTMLOptionElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLOptionElement
  +{
  +
  +    
  +
  +    public boolean getDefaultSelected()
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        return getBinary( "default-selected" );
  +    }
  +    
  +    
  +    public void setDefaultSelected( boolean defaultSelected )
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        setAttribute( "default-selected", defaultSelected );
  +    }
  +
  +  
  +    public String getText()
  +    {
  +        Node    child;
  +        String    text;
  +        
  +        // Find the Text nodes contained within this element and return their
  +        // concatenated value. Required to go around comments, entities, etc.
  +        child = getFirstChild();
  +        text = "";
  +        while ( child != null )
  +        {
  +            if ( child instanceof Text )
  +                text = text + ( (Text) child ).getData();
  +            child = child.getNextSibling();
  +        }
  +        return text;
  +    }
  +    
  +    
  +    public void setText( String text )
  +    {
  +        Node    child;
  +        Node    next;
  +        
  +        // Delete all the nodes and replace them with a single Text node.
  +        // This is the only approach that can handle comments and other nodes.
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            next = child.getNextSibling();
  +            removeChild( child );
  +            child = next;
  +        }
  +        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  +    }
  +    
  +    
  +    public int getIndex()
  +    {
  +        Node        parent;
  +        NodeList    options;
  +        int            i;
  +        
  +        // Locate the parent SELECT. Note that this OPTION might be inside a
  +        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
  +        // Everything is possible. If no parent is found, return -1.
  +        parent = getParentNode();
  +        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
  +            parent = parent.getParentNode();
  +        if ( parent != null )
  +        {
  +            // Use getElementsByTagName() which creates a snapshot of all the
  +            // OPTION elements under the SELECT. Access to the returned NodeList
  +            // is very fast and the snapshot solves many synchronization problems.
  +            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
  +            for ( i = 0 ; i < options.getLength() ; ++i )
  +                if ( options.item( i ) == this )
  +                    return i;
  +        }
  +        return -1;
  +    }
  +    
  +    
  +    public void setIndex( int index )
  +    {
  +        Node        parent;
  +        NodeList    options;
  +        Node        item;
  +        
  +        // Locate the parent SELECT. Note that this OPTION might be inside a
  +        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
  +        // Everything is possible. If no parent is found, just return.
  +        parent = getParentNode();
  +        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
  +            parent = parent.getParentNode();
  +        if ( parent != null )
  +        {
  +            // Use getElementsByTagName() which creates a snapshot of all the
  +            // OPTION elements under the SELECT. Access to the returned NodeList
  +            // is very fast and the snapshot solves many synchronization problems.
  +            // Make sure this OPTION is not replacing itself.
  +            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
  +            if ( options.item( index ) != this )
  +            {
  +                // Remove this OPTION from its parent. Place this OPTION right
  +                // before indexed OPTION underneath it's direct parent (might
  +                // be an OPTGROUP).
  +                getParentNode().removeChild( this );
  +                item = options.item( index );
  +                item.getParentNode().insertBefore( this, item );
  +            }
  +        }
  +    }
  +  
  +  
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +      public String getLabel()
  +    {
  +        return capitalize( getAttribute( "label" ) );
  +    }
  +    
  +    
  +    public void setLabel( String label )
  +    {
  +        setAttribute( "label", label );
  +    }
  +
  +    
  +    public boolean getSelected()
  +    {
  +        return getBinary( "selected" );
  +    }
  +  
  +  
  +    public void setSelected( boolean selected )
  +    {
  +        setAttribute( "selected", selected );
  +    }
  +    
  +        
  +    public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLOptionElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLParagraphElementImpl.java
  
  Index: HTMLParagraphElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLParagraphElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLParagraphElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLParagraphElementImpl.java	2001/02/14 18:28:57	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLParagraphElement
  - * @see ElementImpl
  - */
  -public final class HTMLParagraphElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLParagraphElement
  -{
  -    
  -    
  -    public String getAlign()
  -    {
  -        return getAttribute( "align" );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLParagraphElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:57 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLParagraphElement
  + * @see ElementImpl
  + */
  +public class HTMLParagraphElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLParagraphElement
  +{
  +    
  +    
  +    public String getAlign()
  +    {
  +        return getAttribute( "align" );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLParagraphElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +80 -80    xml-xerces/java/src/org/apache/html/dom/HTMLParamElementImpl.java
  
  Index: HTMLParamElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLParamElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLParamElementImpl.java	2000/02/10 04:00:11	1.2
  +++ HTMLParamElementImpl.java	2001/02/14 18:28:57	1.2.4.1
  @@ -54,83 +54,83 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:11 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLParamElement
  - * @see ElementImpl
  - */
  -public final class HTMLParamElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLParamElement
  -{
  -    
  -    
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -  
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -      public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -
  -    
  -      public String getValueType()
  -    {
  -        return capitalize( getAttribute( "valuetype" ) );
  -    }
  -    
  -    
  -    public void setValueType( String valueType )
  -    {
  -        setAttribute( "valuetype", valueType );
  -    }
  -
  -
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLParamElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:57 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLParamElement
  + * @see ElementImpl
  + */
  +public class HTMLParamElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLParamElement
  +{
  +    
  +    
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +  
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +      public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +
  +    
  +      public String getValueType()
  +    {
  +        return capitalize( getAttribute( "valuetype" ) );
  +    }
  +    
  +    
  +    public void setValueType( String valueType )
  +    {
  +        setAttribute( "valuetype", valueType );
  +    }
  +
  +
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLParamElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLPreElementImpl.java
  
  Index: HTMLPreElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLPreElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLPreElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLPreElementImpl.java	2001/02/14 18:28:57	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLPreElement
  - * @see ElementImpl
  - */
  -public final class HTMLPreElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLPreElement
  -{
  -    
  -    
  -      public int getWidth()
  -    {
  -        return getInteger( getAttribute( "width" ) );
  -    }
  -    
  -    
  -    public void setWidth( int width )
  -    {
  -        setAttribute( "width", String.valueOf( width ) );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLPreElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:57 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLPreElement
  + * @see ElementImpl
  + */
  +public class HTMLPreElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLPreElement
  +{
  +    
  +    
  +      public int getWidth()
  +    {
  +        return getInteger( getAttribute( "width" ) );
  +    }
  +    
  +    
  +    public void setWidth( int width )
  +    {
  +        setAttribute( "width", String.valueOf( width ) );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLPreElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLQuoteElementImpl.java
  
  Index: HTMLQuoteElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLQuoteElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLQuoteElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLQuoteElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLQuoteElement
  - * @see ElementImpl
  - */
  -public final class HTMLQuoteElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLQuoteElement
  -{
  -    
  -    
  -    public String getCite()
  -    {
  -        return getAttribute( "cite" );
  -    }
  -    
  -    
  -    public void setCite( String cite )
  -    {
  -        setAttribute( "cite", cite );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLQuoteElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLQuoteElement
  + * @see ElementImpl
  + */
  +public class HTMLQuoteElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLQuoteElement
  +{
  +    
  +    
  +    public String getCite()
  +    {
  +        return getAttribute( "cite" );
  +    }
  +    
  +    
  +    public void setCite( String cite )
  +    {
  +        setAttribute( "cite", cite );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLQuoteElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +140 -140  xml-xerces/java/src/org/apache/html/dom/HTMLScriptElementImpl.java
  
  Index: HTMLScriptElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLScriptElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLScriptElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLScriptElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,143 +54,143 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLScriptElement
  - * @see ElementImpl
  - */
  -public final class HTMLScriptElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLScriptElement
  -{
  -    
  -    
  -    public String getText()
  -    {
  -        Node    child;
  -        String    text;
  -        
  -        // Find the Text nodes contained within this element and return their
  -        // concatenated value. Required to go around comments, entities, etc.
  -        child = getFirstChild();
  -        text = "";
  -        while ( child != null )
  -        {
  -            if ( child instanceof Text )
  -                text = text + ( (Text) child ).getData();
  -            child = child.getNextSibling();
  -        }
  -        return text;
  -    }
  -    
  -    
  -    public void setText( String text )
  -    {
  -        Node    child;
  -        Node    next;
  -        
  -        // Delete all the nodes and replace them with a single Text node.
  -        // This is the only approach that can handle comments and other nodes.
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            next = child.getNextSibling();
  -            removeChild( child );
  -            child = next;
  -        }
  -        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  -    }
  -
  -    
  -       public String getHtmlFor()
  -    {
  -        return getAttribute( "for" );
  -    }
  -    
  -    
  -    public void setHtmlFor( String htmlFor )
  -    {
  -        setAttribute( "for", htmlFor );
  -    }
  -
  -    
  -       public String getEvent()
  -    {
  -        return getAttribute( "event" );
  -    }
  -    
  -    
  -    public void setEvent( String event )
  -    {
  -        setAttribute( "event", event );
  -    }
  -    
  -       public String getCharset()
  -    {
  -        return getAttribute( "charset" );
  -    }
  -    
  -    
  -    public void setCharset( String charset )
  -    {
  -        setAttribute( "charset", charset );
  -    }
  -
  -    
  -    public boolean getDefer()
  -    {
  -        return getBinary( "defer" );
  -    }
  -    
  -    
  -    public void setDefer( boolean defer )
  -    {
  -        setAttribute( "defer", defer );
  -    }
  -
  -  
  -       public String getSrc()
  -    {
  -        return getAttribute( "src" );
  -    }
  -    
  -    
  -    public void setSrc( String src )
  -    {
  -        setAttribute( "src", src );
  -    }
  -
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLScriptElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLScriptElement
  + * @see ElementImpl
  + */
  +public class HTMLScriptElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLScriptElement
  +{
  +    
  +    
  +    public String getText()
  +    {
  +        Node    child;
  +        String    text;
  +        
  +        // Find the Text nodes contained within this element and return their
  +        // concatenated value. Required to go around comments, entities, etc.
  +        child = getFirstChild();
  +        text = "";
  +        while ( child != null )
  +        {
  +            if ( child instanceof Text )
  +                text = text + ( (Text) child ).getData();
  +            child = child.getNextSibling();
  +        }
  +        return text;
  +    }
  +    
  +    
  +    public void setText( String text )
  +    {
  +        Node    child;
  +        Node    next;
  +        
  +        // Delete all the nodes and replace them with a single Text node.
  +        // This is the only approach that can handle comments and other nodes.
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            next = child.getNextSibling();
  +            removeChild( child );
  +            child = next;
  +        }
  +        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  +    }
  +
  +    
  +       public String getHtmlFor()
  +    {
  +        return getAttribute( "for" );
  +    }
  +    
  +    
  +    public void setHtmlFor( String htmlFor )
  +    {
  +        setAttribute( "for", htmlFor );
  +    }
  +
  +    
  +       public String getEvent()
  +    {
  +        return getAttribute( "event" );
  +    }
  +    
  +    
  +    public void setEvent( String event )
  +    {
  +        setAttribute( "event", event );
  +    }
  +    
  +       public String getCharset()
  +    {
  +        return getAttribute( "charset" );
  +    }
  +    
  +    
  +    public void setCharset( String charset )
  +    {
  +        setAttribute( "charset", charset );
  +    }
  +
  +    
  +    public boolean getDefer()
  +    {
  +        return getBinary( "defer" );
  +    }
  +    
  +    
  +    public void setDefer( boolean defer )
  +    {
  +        setAttribute( "defer", defer );
  +    }
  +
  +  
  +       public String getSrc()
  +    {
  +        return getAttribute( "src" );
  +    }
  +    
  +    
  +    public void setSrc( String src )
  +    {
  +        setAttribute( "src", src );
  +    }
  +
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLScriptElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +203 -196  xml-xerces/java/src/org/apache/html/dom/HTMLSelectElementImpl.java
  
  Index: HTMLSelectElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLSelectElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLSelectElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLSelectElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,199 +54,206 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLSelectElement
  - * @see ElementImpl
  - */
  -public final class HTMLSelectElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLSelectElement, HTMLFormControl
  -{
  -    
  -    
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -
  -    
  -      public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -
  -    
  -    public int getSelectedIndex()
  -    {
  -        NodeList    options;
  -        int            i;
  -        
  -        // Use getElementsByTagName() which creates a snapshot of all the
  -        // OPTION elements under this SELECT. Access to the returned NodeList
  -        // is very fast and the snapshot solves many synchronization problems.
  -        // Locate the first selected OPTION and return its index. Note that
  -        // the OPTION might be under an OPTGROUP.
  -        options = getElementsByTagName( "OPTION" );
  -        for ( i = 0 ; i < options.getLength() ; ++i )
  -            if ( ( (HTMLOptionElement) options.item( i ) ).getSelected() )
  -                return i;
  -        return -1;
  -    }
  -    
  -    
  -    public void setSelectedIndex( int selectedIndex )
  -    {
  -        NodeList    options;
  -        int            i;
  -        
  -        // Use getElementsByTagName() which creates a snapshot of all the
  -        // OPTION elements under this SELECT. Access to the returned NodeList
  -        // is very fast and the snapshot solves many synchronization problems.
  -        // Change the select so all OPTIONs are off, except for the
  -        // selectIndex-th one.
  -        options = getElementsByTagName( "OPTION" );
  -        for ( i = 0 ; i < options.getLength() ; ++i )
  -            ( (HTMLOptionElementImpl) options.item( i ) ).setSelected( i == selectedIndex );
  -    }
  -
  -  
  -    public HTMLCollection getOptions()
  -    {
  -        if ( _options == null )
  -            _options = new HTMLCollectionImpl( this, HTMLCollectionImpl.OPTION );
  -        return _options;
  -    }
  -    
  -
  -    public int getLength()
  -    {
  -        return getOptions().getLength();
  -    }
  -    
  -    
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -      public boolean getMultiple()
  -    {
  -        return getBinary( "multiple" );
  -    }
  -    
  -    
  -    public void setMultiple( boolean multiple )
  -    {
  -        setAttribute( "multiple", multiple );
  -    }
  -
  -  
  -      public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public int getSize()
  -    {
  -        return getInteger( getAttribute( "size" ) );
  -    }
  -    
  -    
  -    public void setSize( int size )
  -    {
  -        setAttribute( "size", String.valueOf( size ) );
  -    }
  -
  -  
  -    public int getTabIndex()
  -    {
  -        return getInteger( getAttribute( "tabindex" ) );
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -    
  -    public void add( HTMLElement element, HTMLElement before )
  -    {
  -        insertBefore( element, before );
  -    }
  -  
  -  
  -    public void remove( int index )
  -    {
  -        NodeList    options;
  -        Node        removed;
  -        
  -        // Use getElementsByTagName() which creates a snapshot of all the
  -        // OPTION elements under this SELECT. Access to the returned NodeList
  -        // is very fast and the snapshot solves many synchronization problems.
  -        // Remove the indexed OPTION from it's parent, this might be this
  -        // SELECT or an OPTGROUP.
  -        options = getElementsByTagName( "OPTION" );
  -        removed = options.item( index );
  -        if ( removed != null )
  -            removed.getParentNode().removeChild ( removed );
  -    }
  -
  -  
  -    public void               blur()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -      
  -      
  -    public void               focus()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -
  -  
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLSelectElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -
  -    private HTMLCollection    _options;
  -  
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLSelectElement
  + * @see ElementImpl
  + */
  +public class HTMLSelectElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLSelectElement, HTMLFormControl
  +{
  +    
  +    
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +
  +    
  +      public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +
  +    
  +    public int getSelectedIndex()
  +    {
  +        NodeList    options;
  +        int            i;
  +        
  +        // Use getElementsByTagName() which creates a snapshot of all the
  +        // OPTION elements under this SELECT. Access to the returned NodeList
  +        // is very fast and the snapshot solves many synchronization problems.
  +        // Locate the first selected OPTION and return its index. Note that
  +        // the OPTION might be under an OPTGROUP.
  +        options = getElementsByTagName( "OPTION" );
  +        for ( i = 0 ; i < options.getLength() ; ++i )
  +            if ( ( (HTMLOptionElement) options.item( i ) ).getSelected() )
  +                return i;
  +        return -1;
  +    }
  +    
  +    
  +    public void setSelectedIndex( int selectedIndex )
  +    {
  +        NodeList    options;
  +        int            i;
  +        
  +        // Use getElementsByTagName() which creates a snapshot of all the
  +        // OPTION elements under this SELECT. Access to the returned NodeList
  +        // is very fast and the snapshot solves many synchronization problems.
  +        // Change the select so all OPTIONs are off, except for the
  +        // selectIndex-th one.
  +        options = getElementsByTagName( "OPTION" );
  +        for ( i = 0 ; i < options.getLength() ; ++i )
  +            ( (HTMLOptionElementImpl) options.item( i ) ).setSelected( i == selectedIndex );
  +    }
  +
  +  
  +    public HTMLCollection getOptions()
  +    {
  +        if ( _options == null )
  +            _options = new HTMLCollectionImpl( this, HTMLCollectionImpl.OPTION );
  +        return _options;
  +    }
  +    
  +
  +    public int getLength()
  +    {
  +        return getOptions().getLength();
  +    }
  +    
  +    
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +      public boolean getMultiple()
  +    {
  +        return getBinary( "multiple" );
  +    }
  +    
  +    
  +    public void setMultiple( boolean multiple )
  +    {
  +        setAttribute( "multiple", multiple );
  +    }
  +
  +  
  +      public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public int getSize()
  +    {
  +        return getInteger( getAttribute( "size" ) );
  +    }
  +    
  +    
  +    public void setSize( int size )
  +    {
  +        setAttribute( "size", String.valueOf( size ) );
  +    }
  +
  +  
  +    public int getTabIndex()
  +    {
  +        return getInteger( getAttribute( "tabindex" ) );
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +    
  +    public void add( HTMLElement element, HTMLElement before )
  +    {
  +        insertBefore( element, before );
  +    }
  +  
  +  
  +    public void remove( int index )
  +    {
  +        NodeList    options;
  +        Node        removed;
  +        
  +        // Use getElementsByTagName() which creates a snapshot of all the
  +        // OPTION elements under this SELECT. Access to the returned NodeList
  +        // is very fast and the snapshot solves many synchronization problems.
  +        // Remove the indexed OPTION from it's parent, this might be this
  +        // SELECT or an OPTGROUP.
  +        options = getElementsByTagName( "OPTION" );
  +        removed = options.item( index );
  +        if ( removed != null )
  +            removed.getParentNode().removeChild ( removed );
  +    }
  +
  +  
  +    public void               blur()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +      
  +      
  +    public void               focus()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +
  +    /*
  +     * Explicit implementation of getChildNodes() to avoid problems with
  +     * overriding the getLength() method hidden in the super class.
  +     */
  +    public NodeList getChildNodes() {
  +        return getChildNodesUnoptimized();
  +    }
  +  
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLSelectElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +
  +    private HTMLCollection    _options;
  +  
  +  
  +}
  +
  
  
  
  1.2.4.1   +68 -68    xml-xerces/java/src/org/apache/html/dom/HTMLStyleElementImpl.java
  
  Index: HTMLStyleElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLStyleElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLStyleElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLStyleElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,71 +54,71 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLStyleElement
  - * @see ElementImpl
  - */
  -public final class HTMLStyleElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLStyleElement
  -{
  -    
  -    
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -    public String getMedia()
  -    {
  -        return getAttribute( "media" );
  -    }
  -    
  -    
  -    public void setMedia( String media )
  -    {
  -        setAttribute( "media", media );
  -    }
  -  
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLStyleElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLStyleElement
  + * @see ElementImpl
  + */
  +public class HTMLStyleElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLStyleElement
  +{
  +    
  +    
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +    public String getMedia()
  +    {
  +        return getAttribute( "media" );
  +    }
  +    
  +    
  +    public void setMedia( String media )
  +    {
  +        setAttribute( "media", media );
  +    }
  +  
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLStyleElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +44 -44    xml-xerces/java/src/org/apache/html/dom/HTMLTableCaptionElementImpl.java
  
  Index: HTMLTableCaptionElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableCaptionElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTableCaptionElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLTableCaptionElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,47 +54,47 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTableCaptionElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableCaptionElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableCaptionElement
  -{
  -    
  -    
  -    public String getAlign()
  -    {
  -        return getAttribute( "align" );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableCaptionElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTableCaptionElement
  + * @see ElementImpl
  + */
  +public class HTMLTableCaptionElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableCaptionElement
  +{
  +    
  +    
  +    public String getAlign()
  +    {
  +        return getAttribute( "align" );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableCaptionElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +262 -262  xml-xerces/java/src/org/apache/html/dom/HTMLTableCellElementImpl.java
  
  Index: HTMLTableCellElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableCellElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTableCellElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLTableCellElementImpl.java	2001/02/14 18:28:58	1.2.4.1
  @@ -54,265 +54,265 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTableCellElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableCellElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableCellElement
  -{
  -    
  -
  -    public int getCellIndex()
  -    {
  -        Node    parent;
  -        Node    child;
  -        int        index;
  -        
  -        parent = getParentNode();
  -        index = 0;
  -        if ( parent instanceof HTMLTableRowElement )
  -        {
  -            child = parent.getFirstChild();
  -            while ( child != null )
  -            {
  -                if ( child instanceof HTMLTableCellElement )
  -                {
  -                    if ( child == this )
  -                        return index;
  -                    ++ index;
  -                }
  -                child = child.getNextSibling();
  -            }
  -        }
  -        return -1;
  -    }
  -    
  -    
  -    public void setCellIndex( int cellIndex )
  -    {
  -        Node    parent;
  -        Node    child;
  -        int        index;
  -        
  -        parent = getParentNode();
  -        if ( parent instanceof HTMLTableRowElement )
  -        {
  -            child = parent.getFirstChild();
  -            while ( child != null )
  -            {
  -                if ( child instanceof HTMLTableCellElement )
  -                {
  -                    if ( cellIndex == 0 )
  -                    {
  -                        if ( this != child )
  -                            parent.insertBefore( this, child );
  -                        return;
  -                    }
  -                    -- cellIndex;
  -                }
  -                child = child.getNextSibling();
  -            }
  -        }
  -        parent.appendChild( this );
  -    }
  -
  -  
  -    public String getAbbr()
  -    {
  -        return getAttribute( "abbr" );
  -    }
  -    
  -    
  -    public void setAbbr( String abbr )
  -    {
  -        setAttribute( "abbr", abbr );
  -    }
  -
  -  
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getAxis()
  -    {
  -        return getAttribute( "axis" );
  -    }
  -    
  -    
  -    public void setAxis( String axis )
  -    {
  -        setAttribute( "axis", axis );
  -    }
  -    
  -    public String getBgColor()
  -    {
  -        return getAttribute( "bgcolor" );
  -    }
  -    
  -    
  -    public void setBgColor( String bgColor )
  -    {
  -        setAttribute( "bgcolor", bgColor );
  -    }
  -
  -  
  -    public String getCh()
  -    {
  -        String    ch;
  -        
  -        // Make sure that the access key is a single character.
  -        ch = getAttribute( "char" );
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        return ch;
  -    }
  -    
  -    
  -    public void setCh( String ch )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        setAttribute( "char", ch );
  -    }
  -
  -    
  -    public String getChOff()
  -    {
  -        return getAttribute( "charoff" );
  -    }
  -    
  -    
  -    public void setChOff( String chOff )
  -    {
  -        setAttribute( "charoff", chOff );
  -    }
  -  
  -  
  -    public int getColSpan()
  -    {
  -        return getInteger( getAttribute( "colspan" ) );
  -    }
  -    
  -    
  -    public void setColSpan( int colspan )
  -    {
  -        setAttribute( "colspan", String.valueOf( colspan ) );
  -    }
  -    
  -    
  -    public String getHeaders()
  -    {
  -        return getAttribute( "headers" );
  -    }
  -    
  -    
  -    public void setHeaders( String headers )
  -    {
  -        setAttribute( "headers", headers );
  -    }
  -  
  -  
  -    public String getHeight()
  -    {
  -        return getAttribute( "height" );
  -    }
  -    
  -    
  -    public void setHeight( String height )
  -    {
  -        setAttribute( "height", height );
  -    }
  -
  -  
  -      public boolean getNoWrap()
  -    {
  -        return getBinary( "nowrap" );
  -    }
  -    
  -    
  -    public void setNoWrap( boolean noWrap )
  -    {
  -        setAttribute( "nowrap", noWrap );
  -    }
  -
  -    public int getRowSpan()
  -    {
  -        return getInteger( getAttribute( "rowspan" ) );
  -    }
  -    
  -    
  -    public void setRowSpan( int rowspan )
  -    {
  -        setAttribute( "rowspan", String.valueOf( rowspan ) );
  -    }
  -  
  -    
  -    public String getScope()
  -    {
  -        return getAttribute( "scope" );
  -    }
  -    
  -    
  -    public void setScope( String scope )
  -    {
  -        setAttribute( "scope", scope );
  -    }
  -  
  -  
  -    public String getVAlign()
  -    {
  -        return capitalize( getAttribute( "valign" ) );
  -    }
  -    
  -    
  -    public void setVAlign( String vAlign )
  -    {
  -        setAttribute( "valign", vAlign );
  -    }
  -
  -  
  -      public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableCellElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:58 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTableCellElement
  + * @see ElementImpl
  + */
  +public class HTMLTableCellElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableCellElement
  +{
  +    
  +
  +    public int getCellIndex()
  +    {
  +        Node    parent;
  +        Node    child;
  +        int        index;
  +        
  +        parent = getParentNode();
  +        index = 0;
  +        if ( parent instanceof HTMLTableRowElement )
  +        {
  +            child = parent.getFirstChild();
  +            while ( child != null )
  +            {
  +                if ( child instanceof HTMLTableCellElement )
  +                {
  +                    if ( child == this )
  +                        return index;
  +                    ++ index;
  +                }
  +                child = child.getNextSibling();
  +            }
  +        }
  +        return -1;
  +    }
  +    
  +    
  +    public void setCellIndex( int cellIndex )
  +    {
  +        Node    parent;
  +        Node    child;
  +        int        index;
  +        
  +        parent = getParentNode();
  +        if ( parent instanceof HTMLTableRowElement )
  +        {
  +            child = parent.getFirstChild();
  +            while ( child != null )
  +            {
  +                if ( child instanceof HTMLTableCellElement )
  +                {
  +                    if ( cellIndex == 0 )
  +                    {
  +                        if ( this != child )
  +                            parent.insertBefore( this, child );
  +                        return;
  +                    }
  +                    -- cellIndex;
  +                }
  +                child = child.getNextSibling();
  +            }
  +        }
  +        parent.appendChild( this );
  +    }
  +
  +  
  +    public String getAbbr()
  +    {
  +        return getAttribute( "abbr" );
  +    }
  +    
  +    
  +    public void setAbbr( String abbr )
  +    {
  +        setAttribute( "abbr", abbr );
  +    }
  +
  +  
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getAxis()
  +    {
  +        return getAttribute( "axis" );
  +    }
  +    
  +    
  +    public void setAxis( String axis )
  +    {
  +        setAttribute( "axis", axis );
  +    }
  +    
  +    public String getBgColor()
  +    {
  +        return getAttribute( "bgcolor" );
  +    }
  +    
  +    
  +    public void setBgColor( String bgColor )
  +    {
  +        setAttribute( "bgcolor", bgColor );
  +    }
  +
  +  
  +    public String getCh()
  +    {
  +        String    ch;
  +        
  +        // Make sure that the access key is a single character.
  +        ch = getAttribute( "char" );
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        return ch;
  +    }
  +    
  +    
  +    public void setCh( String ch )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        setAttribute( "char", ch );
  +    }
  +
  +    
  +    public String getChOff()
  +    {
  +        return getAttribute( "charoff" );
  +    }
  +    
  +    
  +    public void setChOff( String chOff )
  +    {
  +        setAttribute( "charoff", chOff );
  +    }
  +  
  +  
  +    public int getColSpan()
  +    {
  +        return getInteger( getAttribute( "colspan" ) );
  +    }
  +    
  +    
  +    public void setColSpan( int colspan )
  +    {
  +        setAttribute( "colspan", String.valueOf( colspan ) );
  +    }
  +    
  +    
  +    public String getHeaders()
  +    {
  +        return getAttribute( "headers" );
  +    }
  +    
  +    
  +    public void setHeaders( String headers )
  +    {
  +        setAttribute( "headers", headers );
  +    }
  +  
  +  
  +    public String getHeight()
  +    {
  +        return getAttribute( "height" );
  +    }
  +    
  +    
  +    public void setHeight( String height )
  +    {
  +        setAttribute( "height", height );
  +    }
  +
  +  
  +      public boolean getNoWrap()
  +    {
  +        return getBinary( "nowrap" );
  +    }
  +    
  +    
  +    public void setNoWrap( boolean noWrap )
  +    {
  +        setAttribute( "nowrap", noWrap );
  +    }
  +
  +    public int getRowSpan()
  +    {
  +        return getInteger( getAttribute( "rowspan" ) );
  +    }
  +    
  +    
  +    public void setRowSpan( int rowspan )
  +    {
  +        setAttribute( "rowspan", String.valueOf( rowspan ) );
  +    }
  +  
  +    
  +    public String getScope()
  +    {
  +        return getAttribute( "scope" );
  +    }
  +    
  +    
  +    public void setScope( String scope )
  +    {
  +        setAttribute( "scope", scope );
  +    }
  +  
  +  
  +    public String getVAlign()
  +    {
  +        return capitalize( getAttribute( "valign" ) );
  +    }
  +    
  +    
  +    public void setVAlign( String vAlign )
  +    {
  +        setAttribute( "valign", vAlign );
  +    }
  +
  +  
  +      public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableCellElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +112 -112  xml-xerces/java/src/org/apache/html/dom/HTMLTableColElementImpl.java
  
  Index: HTMLTableColElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableColElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTableColElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLTableColElementImpl.java	2001/02/14 18:28:59	1.2.4.1
  @@ -54,115 +54,115 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTableColElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableColElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableColElement
  -{
  -    
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getCh()
  -    {
  -        String    ch;
  -        
  -        // Make sure that the access key is a single character.
  -        ch = getAttribute( "char" );
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        return ch;
  -    }
  -    
  -    
  -    public void setCh( String ch )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        setAttribute( "char", ch );
  -    }
  -
  -
  -    public String getChOff()
  -    {
  -        return getAttribute( "charoff" );
  -    }
  -    
  -    
  -    public void setChOff( String chOff )
  -    {
  -        setAttribute( "charoff", chOff );
  -    }
  -  
  -  
  -    public int getSpan()
  -    {
  -        return getInteger( getAttribute( "span" ) );
  -    }
  -    
  -    
  -    public void setSpan( int span )
  -    {
  -        setAttribute( "span", String.valueOf( span ) );
  -    }
  -
  -    
  -    public String getVAlign()
  -    {
  -        return capitalize( getAttribute( "valign" ) );
  -    }
  -    
  -    
  -    public void setVAlign( String vAlign )
  -    {
  -        setAttribute( "valign", vAlign );
  -    }
  -    
  -    public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableColElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:59 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTableColElement
  + * @see ElementImpl
  + */
  +public class HTMLTableColElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableColElement
  +{
  +    
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getCh()
  +    {
  +        String    ch;
  +        
  +        // Make sure that the access key is a single character.
  +        ch = getAttribute( "char" );
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        return ch;
  +    }
  +    
  +    
  +    public void setCh( String ch )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        setAttribute( "char", ch );
  +    }
  +
  +
  +    public String getChOff()
  +    {
  +        return getAttribute( "charoff" );
  +    }
  +    
  +    
  +    public void setChOff( String chOff )
  +    {
  +        setAttribute( "charoff", chOff );
  +    }
  +  
  +  
  +    public int getSpan()
  +    {
  +        return getInteger( getAttribute( "span" ) );
  +    }
  +    
  +    
  +    public void setSpan( int span )
  +    {
  +        setAttribute( "span", String.valueOf( span ) );
  +    }
  +
  +    
  +    public String getVAlign()
  +    {
  +        return capitalize( getAttribute( "valign" ) );
  +    }
  +    
  +    
  +    public void setVAlign( String vAlign )
  +    {
  +        setAttribute( "valign", vAlign );
  +    }
  +    
  +    public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableColElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.5.4.1   +377 -377  xml-xerces/java/src/org/apache/html/dom/HTMLTableElementImpl.java
  
  Index: HTMLTableElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableElementImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.5.4.1
  diff -u -r1.5 -r1.5.4.1
  --- HTMLTableElementImpl.java	2000/03/28 23:01:53	1.5
  +++ HTMLTableElementImpl.java	2001/02/14 18:28:59	1.5.4.1
  @@ -54,380 +54,380 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.5 $ $Date: 2000/03/28 23:01:53 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLAnchorElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableElement
  -{
  -    
  -    
  -    public synchronized HTMLTableCaptionElement getCaption()
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableCaptionElement &&
  -                 child.getNodeName().equals( "CAPTION" ) )
  -                return (HTMLTableCaptionElement) child;
  -            child = child.getNextSibling();
  -        }
  -        return null;
  -    }
  -    
  -    
  -    public synchronized void setCaption( HTMLTableCaptionElement caption )
  -    {
  -        if ( caption != null && ! caption.getTagName().equals( "CAPTION" ) )
  -            throw new IllegalArgumentException( "HTM016 Argument 'caption' is not an element of type <CAPTION>." );
  -        deleteCaption();
  -        if ( caption != null )
  -            appendChild( caption );
  -    }
  -    
  -    
  -    public synchronized HTMLElement createCaption()
  -    {
  -        HTMLElement    section;
  -        
  -        section = getCaption();
  -        if ( section != null )
  -            return section;
  -        section = new HTMLTableCaptionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "CAPTION" );
  -        appendChild( section );
  -        return section;
  -    }
  -
  -  
  -    public synchronized void deleteCaption()
  -    {
  -        Node    old;
  -        
  -        old = getCaption();
  -        if ( old != null )
  -            removeChild ( old );
  -    }
  -    
  -    public synchronized HTMLTableSectionElement getTHead()
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableSectionElement &&
  -                 child.getNodeName().equals( "THEAD" ) )
  -                return (HTMLTableSectionElement) child;
  -            child = child.getNextSibling();
  -        }
  -        return null;
  -    }
  -    
  -    
  -    public synchronized void setTHead( HTMLTableSectionElement tHead )
  -    {
  -        if ( tHead != null && ! tHead.getTagName().equals( "THEAD" ) )
  -            throw new IllegalArgumentException( "HTM017 Argument 'tHead' is not an element of type <THEAD>." );
  -        deleteTHead();
  -        if ( tHead != null )
  -            appendChild( tHead );
  -    }
  -    
  -    
  -    public synchronized HTMLElement createTHead()
  -    {
  -        HTMLElement    section;
  -        
  -        section = getTHead();
  -        if ( section != null )
  -            return section;
  -        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "THEAD" );
  -        appendChild( section );
  -        return section;
  -    }
  -
  -    
  -    public synchronized void deleteTHead()
  -    {
  -        Node    old;
  -        
  -        old = getTHead();
  -        if ( old != null )
  -            removeChild ( old );
  -    }
  -    
  -    public synchronized HTMLTableSectionElement getTFoot()
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableSectionElement &&
  -                 child.getNodeName().equals( "TFOOT" ) )
  -                return (HTMLTableSectionElement) child;
  -            child = child.getNextSibling();
  -        }
  -        return null;
  -    }
  -    
  -    
  -    public synchronized void setTFoot( HTMLTableSectionElement tFoot )
  -    {
  -        if ( tFoot != null && ! tFoot.getTagName().equals( "TFOOT" ) )
  -            throw new IllegalArgumentException( "HTM018 Argument 'tFoot' is not an element of type <TFOOT>." );
  -        deleteTFoot();
  -        if ( tFoot != null )
  -            appendChild( tFoot );
  -    }
  -    
  -    
  -    public synchronized HTMLElement createTFoot()
  -    {
  -        HTMLElement    section;
  -        
  -        section = getTFoot();
  -        if ( section != null )
  -            return section;
  -        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TFOOT" );
  -        appendChild( section );
  -        return section;
  -    }
  -
  -    
  -    public synchronized void deleteTFoot()
  -    {
  -        Node    old;
  -        
  -        old = getTFoot();
  -        if ( old != null )
  -            removeChild ( old );
  -    }
  -    
  -    public HTMLCollection getRows()
  -    {
  -        if ( _rows == null )
  -            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
  -        return _rows;
  -    }
  -    
  -
  -    public HTMLCollection getTBodies()
  -    {
  -        if ( _bodies == null )
  -            _bodies = new HTMLCollectionImpl( this, HTMLCollectionImpl.TBODY );
  -        return _bodies;
  -    }
  -  
  -  
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -  
  -    
  -    public String getBgColor()
  -    {
  -        return getAttribute( "bgcolor" );
  -    }
  -    
  -    
  -    public void setBgColor( String bgColor )
  -    {
  -        setAttribute( "bgcolor", bgColor );
  -    }
  -  
  -  
  -    public String getBorder()
  -    {
  -        return getAttribute( "border" );
  -    }
  -    
  -    
  -    public void setBorder( String border )
  -    {
  -        setAttribute( "border", border );
  -    }
  -
  -    
  -    public String getCellPadding()
  -    {
  -        return getAttribute( "cellpadding" );
  -    }
  -    
  -    
  -    public void setCellPadding( String cellPadding )
  -    {
  -        setAttribute( "cellpadding", cellPadding );
  -    }
  -    
  -    
  -    public String getCellSpacing()
  -    {
  -        return getAttribute( "cellspacing" );
  -    }
  -    
  -    
  -    public void setCellSpacing( String cellSpacing )
  -    {
  -        setAttribute( "cellspacing", cellSpacing );
  -    }
  -    
  -    
  -    public String getFrame()
  -    {
  -        return capitalize( getAttribute( "frame" ) );
  -    }
  -    
  -    
  -    public void setFrame( String frame )
  -    {
  -        setAttribute( "frame", frame );
  -    }
  -    
  -    
  -    public String getRules()
  -    {
  -        return capitalize( getAttribute( "rules" ) );
  -    }
  -    
  -    
  -    public void setRules( String rules )
  -    {
  -        setAttribute( "rules", rules );
  -    }
  -    
  -    
  -    public String getSummary()
  -    {
  -        return getAttribute( "summary" );
  -    }
  -    
  -    
  -    public void setSummary( String summary )
  -    {
  -        setAttribute( "summary", summary );
  -    }
  -
  -  
  -      public String getWidth()
  -    {
  -        return getAttribute( "width" );
  -    }
  -    
  -    
  -    public void setWidth( String width )
  -    {
  -        setAttribute( "width", width );
  -    }
  -
  -    
  -    public HTMLElement insertRow( int index )
  -    {
  -        HTMLTableRowElementImpl    newRow;
  -
  -        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
  -        //newRow.insertCell( 0 );
  -        insertRowX( index, newRow );
  -        return newRow;
  -    }
  -        
  -        
  -    void insertRowX( int index, HTMLTableRowElementImpl newRow )
  -    {
  -        Node    child;
  -        Node    lastSection = null;
  -                
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableRowElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    insertBefore( newRow, child );
  -                    return;
  -                }
  -            }
  -            else
  -            if ( child instanceof HTMLTableSectionElementImpl )
  -            {
  -                lastSection = child;
  -                index = ( (HTMLTableSectionElementImpl) child ).insertRowX( index, newRow );
  -                if ( index < 0 )
  -                    return;
  -            }
  -            child = child.getNextSibling();
  -        }
  -        if ( lastSection != null )
  -            lastSection.appendChild( newRow );
  -        else
  -            appendChild( newRow );
  -    }
  -    
  -    
  -    public synchronized void deleteRow( int index )
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableRowElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    removeChild ( child );
  -                    return;
  -                }
  -            }
  -            else
  -            if ( child instanceof HTMLTableSectionElementImpl )
  -            {
  -                index = ( (HTMLTableSectionElementImpl) child ).deleteRowX( index );
  -                if ( index < 0 )
  -                    return;
  -            }
  -            child = child.getNextSibling();
  -        }
  -    }
  -
  -  
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -    
  -  
  -    private HTMLCollectionImpl    _rows;
  -    
  -    
  -    private HTMLCollectionImpl    _bodies;
  -  
  -    
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.5.4.1 $ $Date: 2001/02/14 18:28:59 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLAnchorElement
  + * @see ElementImpl
  + */
  +public class HTMLTableElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableElement
  +{
  +    
  +    
  +    public synchronized HTMLTableCaptionElement getCaption()
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableCaptionElement &&
  +                 child.getNodeName().equals( "CAPTION" ) )
  +                return (HTMLTableCaptionElement) child;
  +            child = child.getNextSibling();
  +        }
  +        return null;
  +    }
  +    
  +    
  +    public synchronized void setCaption( HTMLTableCaptionElement caption )
  +    {
  +        if ( caption != null && ! caption.getTagName().equals( "CAPTION" ) )
  +            throw new IllegalArgumentException( "HTM016 Argument 'caption' is not an element of type <CAPTION>." );
  +        deleteCaption();
  +        if ( caption != null )
  +            appendChild( caption );
  +    }
  +    
  +    
  +    public synchronized HTMLElement createCaption()
  +    {
  +        HTMLElement    section;
  +        
  +        section = getCaption();
  +        if ( section != null )
  +            return section;
  +        section = new HTMLTableCaptionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "CAPTION" );
  +        appendChild( section );
  +        return section;
  +    }
  +
  +  
  +    public synchronized void deleteCaption()
  +    {
  +        Node    old;
  +        
  +        old = getCaption();
  +        if ( old != null )
  +            removeChild ( old );
  +    }
  +    
  +    public synchronized HTMLTableSectionElement getTHead()
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableSectionElement &&
  +                 child.getNodeName().equals( "THEAD" ) )
  +                return (HTMLTableSectionElement) child;
  +            child = child.getNextSibling();
  +        }
  +        return null;
  +    }
  +    
  +    
  +    public synchronized void setTHead( HTMLTableSectionElement tHead )
  +    {
  +        if ( tHead != null && ! tHead.getTagName().equals( "THEAD" ) )
  +            throw new IllegalArgumentException( "HTM017 Argument 'tHead' is not an element of type <THEAD>." );
  +        deleteTHead();
  +        if ( tHead != null )
  +            appendChild( tHead );
  +    }
  +    
  +    
  +    public synchronized HTMLElement createTHead()
  +    {
  +        HTMLElement    section;
  +        
  +        section = getTHead();
  +        if ( section != null )
  +            return section;
  +        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "THEAD" );
  +        appendChild( section );
  +        return section;
  +    }
  +
  +    
  +    public synchronized void deleteTHead()
  +    {
  +        Node    old;
  +        
  +        old = getTHead();
  +        if ( old != null )
  +            removeChild ( old );
  +    }
  +    
  +    public synchronized HTMLTableSectionElement getTFoot()
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableSectionElement &&
  +                 child.getNodeName().equals( "TFOOT" ) )
  +                return (HTMLTableSectionElement) child;
  +            child = child.getNextSibling();
  +        }
  +        return null;
  +    }
  +    
  +    
  +    public synchronized void setTFoot( HTMLTableSectionElement tFoot )
  +    {
  +        if ( tFoot != null && ! tFoot.getTagName().equals( "TFOOT" ) )
  +            throw new IllegalArgumentException( "HTM018 Argument 'tFoot' is not an element of type <TFOOT>." );
  +        deleteTFoot();
  +        if ( tFoot != null )
  +            appendChild( tFoot );
  +    }
  +    
  +    
  +    public synchronized HTMLElement createTFoot()
  +    {
  +        HTMLElement    section;
  +        
  +        section = getTFoot();
  +        if ( section != null )
  +            return section;
  +        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TFOOT" );
  +        appendChild( section );
  +        return section;
  +    }
  +
  +    
  +    public synchronized void deleteTFoot()
  +    {
  +        Node    old;
  +        
  +        old = getTFoot();
  +        if ( old != null )
  +            removeChild ( old );
  +    }
  +    
  +    public HTMLCollection getRows()
  +    {
  +        if ( _rows == null )
  +            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
  +        return _rows;
  +    }
  +    
  +
  +    public HTMLCollection getTBodies()
  +    {
  +        if ( _bodies == null )
  +            _bodies = new HTMLCollectionImpl( this, HTMLCollectionImpl.TBODY );
  +        return _bodies;
  +    }
  +  
  +  
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +  
  +    
  +    public String getBgColor()
  +    {
  +        return getAttribute( "bgcolor" );
  +    }
  +    
  +    
  +    public void setBgColor( String bgColor )
  +    {
  +        setAttribute( "bgcolor", bgColor );
  +    }
  +  
  +  
  +    public String getBorder()
  +    {
  +        return getAttribute( "border" );
  +    }
  +    
  +    
  +    public void setBorder( String border )
  +    {
  +        setAttribute( "border", border );
  +    }
  +
  +    
  +    public String getCellPadding()
  +    {
  +        return getAttribute( "cellpadding" );
  +    }
  +    
  +    
  +    public void setCellPadding( String cellPadding )
  +    {
  +        setAttribute( "cellpadding", cellPadding );
  +    }
  +    
  +    
  +    public String getCellSpacing()
  +    {
  +        return getAttribute( "cellspacing" );
  +    }
  +    
  +    
  +    public void setCellSpacing( String cellSpacing )
  +    {
  +        setAttribute( "cellspacing", cellSpacing );
  +    }
  +    
  +    
  +    public String getFrame()
  +    {
  +        return capitalize( getAttribute( "frame" ) );
  +    }
  +    
  +    
  +    public void setFrame( String frame )
  +    {
  +        setAttribute( "frame", frame );
  +    }
  +    
  +    
  +    public String getRules()
  +    {
  +        return capitalize( getAttribute( "rules" ) );
  +    }
  +    
  +    
  +    public void setRules( String rules )
  +    {
  +        setAttribute( "rules", rules );
  +    }
  +    
  +    
  +    public String getSummary()
  +    {
  +        return getAttribute( "summary" );
  +    }
  +    
  +    
  +    public void setSummary( String summary )
  +    {
  +        setAttribute( "summary", summary );
  +    }
  +
  +  
  +      public String getWidth()
  +    {
  +        return getAttribute( "width" );
  +    }
  +    
  +    
  +    public void setWidth( String width )
  +    {
  +        setAttribute( "width", width );
  +    }
  +
  +    
  +    public HTMLElement insertRow( int index )
  +    {
  +        HTMLTableRowElementImpl    newRow;
  +
  +        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
  +        //newRow.insertCell( 0 );
  +        insertRowX( index, newRow );
  +        return newRow;
  +    }
  +        
  +        
  +    void insertRowX( int index, HTMLTableRowElementImpl newRow )
  +    {
  +        Node    child;
  +        Node    lastSection = null;
  +                
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableRowElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    insertBefore( newRow, child );
  +                    return;
  +                }
  +            }
  +            else
  +            if ( child instanceof HTMLTableSectionElementImpl )
  +            {
  +                lastSection = child;
  +                index = ( (HTMLTableSectionElementImpl) child ).insertRowX( index, newRow );
  +                if ( index < 0 )
  +                    return;
  +            }
  +            child = child.getNextSibling();
  +        }
  +        if ( lastSection != null )
  +            lastSection.appendChild( newRow );
  +        else
  +            appendChild( newRow );
  +    }
  +    
  +    
  +    public synchronized void deleteRow( int index )
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableRowElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    removeChild ( child );
  +                    return;
  +                }
  +            }
  +            else
  +            if ( child instanceof HTMLTableSectionElementImpl )
  +            {
  +                index = ( (HTMLTableSectionElementImpl) child ).deleteRowX( index );
  +                if ( index < 0 )
  +                    return;
  +            }
  +            child = child.getNextSibling();
  +        }
  +    }
  +
  +  
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +    
  +  
  +    private HTMLCollectionImpl    _rows;
  +    
  +    
  +    private HTMLCollectionImpl    _bodies;
  +  
  +    
  +}
  +
  
  
  
  1.2.4.1   +243 -243  xml-xerces/java/src/org/apache/html/dom/HTMLTableRowElementImpl.java
  
  Index: HTMLTableRowElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableRowElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTableRowElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLTableRowElementImpl.java	2001/02/14 18:28:59	1.2.4.1
  @@ -54,246 +54,246 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTableRowElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableRowElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableRowElement
  -{
  -
  -    
  -    public int getRowIndex()
  -    {
  -        Node    parent;
  -        
  -        parent = getParentNode();
  -        if ( parent instanceof HTMLTableSectionElement )
  -            parent = parent.getParentNode();
  -        if ( parent instanceof HTMLTableElement )
  -            return getRowIndex( parent );;
  -        return -1;
  -    }
  -    
  -    
  -    public void setRowIndex( int rowIndex )
  -    {
  -        Node    parent;
  -        
  -        parent = getParentNode();
  -        if ( parent instanceof HTMLTableSectionElement )
  -            parent = parent.getParentNode();
  -        if ( parent instanceof HTMLTableElement )
  -            ( (HTMLTableElementImpl) parent ).insertRowX( rowIndex, this );
  -    }
  -
  -  
  -    public int getSectionRowIndex()
  -    {
  -        Node    parent;
  -        
  -        parent = getParentNode();
  -        if ( parent instanceof HTMLTableSectionElement )
  -            return getRowIndex( parent );
  -        else
  -            return -1;
  -    }
  -    
  -    
  -    public void setSectionRowIndex( int sectionRowIndex )
  -    {
  -        Node    parent;
  -        
  -        parent = getParentNode();
  -        if ( parent instanceof HTMLTableSectionElement )
  -            ( (HTMLTableSectionElementImpl) parent ).insertRowX( sectionRowIndex, this );
  -    }
  -  
  -  
  -    int getRowIndex( Node parent )
  -    {
  -        NodeList    rows;
  -        int            i;
  -        
  -        // Use getElementsByTagName() which creates a snapshot of all the
  -        // TR elements under the TABLE/section. Access to the returned NodeList
  -        // is very fast and the snapshot solves many synchronization problems.
  -        rows = ( (HTMLElement) parent ).getElementsByTagName( "TR" );
  -        for ( i = 0 ; i < rows.getLength() ; ++i )
  -            if ( rows.item( i ) == this )
  -                return i;
  -        return -1;
  -    }
  -
  -  
  -    public HTMLCollection  getCells()
  -    {
  -        if ( _cells == null )
  -            _cells = new HTMLCollectionImpl( this, HTMLCollectionImpl.CELL );
  -        return _cells;
  -    }
  -    
  -    
  -    public void setCells( HTMLCollection cells )
  -    {
  -        Node    child;
  -        int        i;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            removeChild( child );
  -            child = child.getNextSibling();
  -        }
  -        i = 0;
  -        child = cells.item( i );
  -        while ( child != null )
  -        {
  -            appendChild ( child );
  -            ++i;
  -            child = cells.item( i );
  -        }
  -    }
  -
  -  
  -    public HTMLElement insertCell( int index )
  -    {
  -        Node        child;
  -        HTMLElement    newCell;
  -        
  -        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableCellElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    insertBefore( newCell, child );
  -                    return newCell;
  -                }
  -                --index;
  -            }
  -            child = child.getNextSibling();
  -        }
  -        appendChild( newCell );
  -        return newCell;
  -    }
  -    
  -    
  -    public void deleteCell( int index )
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableCellElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    removeChild ( child );
  -                    return;
  -                }
  -                --index;
  -            }
  -            child = child.getNextSibling();
  -        }
  -    }
  -
  -  
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -
  -    
  -    public String getBgColor()
  -    {
  -        return getAttribute( "bgcolor" );
  -    }
  -    
  -    
  -    public void setBgColor( String bgColor )
  -    {
  -        setAttribute( "bgcolor", bgColor );
  -    }
  -
  -  
  -    public String getCh()
  -    {
  -        String    ch;
  -        
  -        // Make sure that the access key is a single character.
  -        ch = getAttribute( "char" );
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        return ch;
  -    }
  -    
  -    
  -    public void setCh( String ch )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        setAttribute( "char", ch );
  -    }
  -
  -    
  -    public String getChOff()
  -    {
  -        return getAttribute( "charoff" );
  -    }
  -    
  -    
  -    public void setChOff( String chOff )
  -    {
  -        setAttribute( "charoff", chOff );
  -    }
  -  
  -  
  -    public String getVAlign()
  -    {
  -        return capitalize( getAttribute( "valign" ) );
  -    }
  -    
  -    
  -    public void setVAlign( String vAlign )
  -    {
  -        setAttribute( "valign", vAlign );
  -    }
  -
  -    
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableRowElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -  
  -  
  -    HTMLCollection    _cells;
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:59 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTableRowElement
  + * @see ElementImpl
  + */
  +public class HTMLTableRowElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableRowElement
  +{
  +
  +    
  +    public int getRowIndex()
  +    {
  +        Node    parent;
  +        
  +        parent = getParentNode();
  +        if ( parent instanceof HTMLTableSectionElement )
  +            parent = parent.getParentNode();
  +        if ( parent instanceof HTMLTableElement )
  +            return getRowIndex( parent );;
  +        return -1;
  +    }
  +    
  +    
  +    public void setRowIndex( int rowIndex )
  +    {
  +        Node    parent;
  +        
  +        parent = getParentNode();
  +        if ( parent instanceof HTMLTableSectionElement )
  +            parent = parent.getParentNode();
  +        if ( parent instanceof HTMLTableElement )
  +            ( (HTMLTableElementImpl) parent ).insertRowX( rowIndex, this );
  +    }
  +
  +  
  +    public int getSectionRowIndex()
  +    {
  +        Node    parent;
  +        
  +        parent = getParentNode();
  +        if ( parent instanceof HTMLTableSectionElement )
  +            return getRowIndex( parent );
  +        else
  +            return -1;
  +    }
  +    
  +    
  +    public void setSectionRowIndex( int sectionRowIndex )
  +    {
  +        Node    parent;
  +        
  +        parent = getParentNode();
  +        if ( parent instanceof HTMLTableSectionElement )
  +            ( (HTMLTableSectionElementImpl) parent ).insertRowX( sectionRowIndex, this );
  +    }
  +  
  +  
  +    int getRowIndex( Node parent )
  +    {
  +        NodeList    rows;
  +        int            i;
  +        
  +        // Use getElementsByTagName() which creates a snapshot of all the
  +        // TR elements under the TABLE/section. Access to the returned NodeList
  +        // is very fast and the snapshot solves many synchronization problems.
  +        rows = ( (HTMLElement) parent ).getElementsByTagName( "TR" );
  +        for ( i = 0 ; i < rows.getLength() ; ++i )
  +            if ( rows.item( i ) == this )
  +                return i;
  +        return -1;
  +    }
  +
  +  
  +    public HTMLCollection  getCells()
  +    {
  +        if ( _cells == null )
  +            _cells = new HTMLCollectionImpl( this, HTMLCollectionImpl.CELL );
  +        return _cells;
  +    }
  +    
  +    
  +    public void setCells( HTMLCollection cells )
  +    {
  +        Node    child;
  +        int        i;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            removeChild( child );
  +            child = child.getNextSibling();
  +        }
  +        i = 0;
  +        child = cells.item( i );
  +        while ( child != null )
  +        {
  +            appendChild ( child );
  +            ++i;
  +            child = cells.item( i );
  +        }
  +    }
  +
  +  
  +    public HTMLElement insertCell( int index )
  +    {
  +        Node        child;
  +        HTMLElement    newCell;
  +        
  +        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableCellElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    insertBefore( newCell, child );
  +                    return newCell;
  +                }
  +                --index;
  +            }
  +            child = child.getNextSibling();
  +        }
  +        appendChild( newCell );
  +        return newCell;
  +    }
  +    
  +    
  +    public void deleteCell( int index )
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableCellElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    removeChild ( child );
  +                    return;
  +                }
  +                --index;
  +            }
  +            child = child.getNextSibling();
  +        }
  +    }
  +
  +  
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +
  +    
  +    public String getBgColor()
  +    {
  +        return getAttribute( "bgcolor" );
  +    }
  +    
  +    
  +    public void setBgColor( String bgColor )
  +    {
  +        setAttribute( "bgcolor", bgColor );
  +    }
  +
  +  
  +    public String getCh()
  +    {
  +        String    ch;
  +        
  +        // Make sure that the access key is a single character.
  +        ch = getAttribute( "char" );
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        return ch;
  +    }
  +    
  +    
  +    public void setCh( String ch )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        setAttribute( "char", ch );
  +    }
  +
  +    
  +    public String getChOff()
  +    {
  +        return getAttribute( "charoff" );
  +    }
  +    
  +    
  +    public void setChOff( String chOff )
  +    {
  +        setAttribute( "charoff", chOff );
  +    }
  +  
  +  
  +    public String getVAlign()
  +    {
  +        return capitalize( getAttribute( "valign" ) );
  +    }
  +    
  +    
  +    public void setVAlign( String vAlign )
  +    {
  +        setAttribute( "valign", vAlign );
  +    }
  +
  +    
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableRowElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +  
  +  
  +    HTMLCollection    _cells;
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +162 -162  xml-xerces/java/src/org/apache/html/dom/HTMLTableSectionElementImpl.java
  
  Index: HTMLTableSectionElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTableSectionElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTableSectionElementImpl.java	2000/02/10 04:00:12	1.2
  +++ HTMLTableSectionElementImpl.java	2001/02/14 18:28:59	1.2.4.1
  @@ -54,165 +54,165 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:12 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTableSectionElement
  - * @see ElementImpl
  - */
  -public final class HTMLTableSectionElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTableSectionElement
  -{    
  -    
  -    
  -    public String getAlign()
  -    {
  -        return capitalize( getAttribute( "align" ) );
  -    }
  -    
  -    
  -    public void setAlign( String align )
  -    {
  -        setAttribute( "align", align );
  -    }
  -      
  -    
  -    public String getCh()
  -    {
  -        String    ch;
  -        
  -        // Make sure that the access key is a single character.
  -        ch = getAttribute( "char" );
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        return ch;
  -    }
  -    
  -    
  -    public void setCh( String ch )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( ch != null && ch.length() > 1 )
  -            ch = ch.substring( 0, 1 );
  -        setAttribute( "char", ch );
  -    }
  -
  -    
  -    public String getChOff()
  -    {
  -        return getAttribute( "charoff" );
  -    }
  -    
  -    
  -    public void setChOff( String chOff )
  -    {
  -        setAttribute( "charoff", chOff );
  -    }
  -  
  -  
  -    public String getVAlign()
  -    {
  -        return capitalize( getAttribute( "valign" ) );
  -    }
  -    
  -    
  -    public void setVAlign( String vAlign )
  -    {
  -        setAttribute( "valign", vAlign );
  -    }
  -
  -    
  -    public HTMLCollection getRows()
  -    {
  -        if ( _rows == null )
  -            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
  -        return _rows;
  -    }
  -    
  -    
  -    public HTMLElement insertRow( int index )
  -    {
  -        HTMLTableRowElementImpl    newRow;
  -        
  -        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
  -        newRow.insertCell( 0 );
  -        if ( insertRowX( index, newRow ) >= 0 )
  -            appendChild( newRow );
  -        return newRow;
  -    }
  -    
  -    
  -    int insertRowX( int index, HTMLTableRowElementImpl newRow )
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableRowElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    insertBefore( newRow, child );
  -                    return -1;
  -                }
  -                --index;
  -            }
  -            child = child.getNextSibling();
  -        }
  -        return index;
  -    }
  -
  -    
  -    public void deleteRow( int index )
  -    {
  -        deleteRowX( index );
  -    }
  -
  -    
  -    int deleteRowX( int index )
  -    {
  -        Node    child;
  -        
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            if ( child instanceof HTMLTableRowElement )
  -            {
  -                if ( index == 0 )
  -                {
  -                    removeChild ( child );
  -                    return -1;
  -                }
  -                --index;
  -            }
  -            child = child.getNextSibling();
  -        }
  -        return index;
  -    }
  -
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTableSectionElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -    private HTMLCollectionImpl    _rows;
  -
  -
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:59 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTableSectionElement
  + * @see ElementImpl
  + */
  +public class HTMLTableSectionElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTableSectionElement
  +{    
  +    
  +    
  +    public String getAlign()
  +    {
  +        return capitalize( getAttribute( "align" ) );
  +    }
  +    
  +    
  +    public void setAlign( String align )
  +    {
  +        setAttribute( "align", align );
  +    }
  +      
  +    
  +    public String getCh()
  +    {
  +        String    ch;
  +        
  +        // Make sure that the access key is a single character.
  +        ch = getAttribute( "char" );
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        return ch;
  +    }
  +    
  +    
  +    public void setCh( String ch )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( ch != null && ch.length() > 1 )
  +            ch = ch.substring( 0, 1 );
  +        setAttribute( "char", ch );
  +    }
  +
  +    
  +    public String getChOff()
  +    {
  +        return getAttribute( "charoff" );
  +    }
  +    
  +    
  +    public void setChOff( String chOff )
  +    {
  +        setAttribute( "charoff", chOff );
  +    }
  +  
  +  
  +    public String getVAlign()
  +    {
  +        return capitalize( getAttribute( "valign" ) );
  +    }
  +    
  +    
  +    public void setVAlign( String vAlign )
  +    {
  +        setAttribute( "valign", vAlign );
  +    }
  +
  +    
  +    public HTMLCollection getRows()
  +    {
  +        if ( _rows == null )
  +            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
  +        return _rows;
  +    }
  +    
  +    
  +    public HTMLElement insertRow( int index )
  +    {
  +        HTMLTableRowElementImpl    newRow;
  +        
  +        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
  +        newRow.insertCell( 0 );
  +        if ( insertRowX( index, newRow ) >= 0 )
  +            appendChild( newRow );
  +        return newRow;
  +    }
  +    
  +    
  +    int insertRowX( int index, HTMLTableRowElementImpl newRow )
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableRowElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    insertBefore( newRow, child );
  +                    return -1;
  +                }
  +                --index;
  +            }
  +            child = child.getNextSibling();
  +        }
  +        return index;
  +    }
  +
  +    
  +    public void deleteRow( int index )
  +    {
  +        deleteRowX( index );
  +    }
  +
  +    
  +    int deleteRowX( int index )
  +    {
  +        Node    child;
  +        
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            if ( child instanceof HTMLTableRowElement )
  +            {
  +                if ( index == 0 )
  +                {
  +                    removeChild ( child );
  +                    return -1;
  +                }
  +                --index;
  +            }
  +            child = child.getNextSibling();
  +        }
  +        return index;
  +    }
  +
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTableSectionElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +    private HTMLCollectionImpl    _rows;
  +
  +
  +}
  +
  
  
  
  1.2.4.1   +176 -176  xml-xerces/java/src/org/apache/html/dom/HTMLTextAreaElementImpl.java
  
  Index: HTMLTextAreaElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTextAreaElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTextAreaElementImpl.java	2000/02/10 04:00:13	1.2
  +++ HTMLTextAreaElementImpl.java	2001/02/14 18:28:59	1.2.4.1
  @@ -54,179 +54,179 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:13 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTextAreaElement
  - * @see ElementImpl
  - */
  -public final class HTMLTextAreaElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTextAreaElement, HTMLFormControl
  -{
  -    
  -    
  -    public String getDefaultValue()
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        return getAttribute( "default-value" );
  -    }
  -    
  -    
  -    public void setDefaultValue( String defaultValue )
  -    {
  -        // ! NOT FULLY IMPLEMENTED !
  -        setAttribute( "default-value", defaultValue );
  -    }
  -  
  -  
  -
  -    public String getAccessKey()
  -    {
  -        String    accessKey;
  -        
  -        // Make sure that the access key is a single character.
  -        accessKey = getAttribute( "accesskey" );
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        return accessKey;
  -    }
  -    
  -    
  -    public void setAccessKey( String accessKey )
  -    {
  -        // Make sure that the access key is a single character.
  -        if ( accessKey != null && accessKey.length() > 1 )
  -            accessKey = accessKey.substring( 0, 1 );
  -        setAttribute( "accesskey", accessKey );
  -    }
  -
  -    
  -    public int getCols()
  -    {
  -        return getInteger( getAttribute( "cols" ) );
  -    }
  -    
  -    
  -    public void setCols( int cols )
  -    {
  -        setAttribute( "cols", String.valueOf( cols ) );
  -    }
  -  
  -  
  -    public boolean getDisabled()
  -    {
  -        return getBinary( "disabled" );
  -    }
  -    
  -    
  -    public void setDisabled( boolean disabled )
  -    {
  -        setAttribute( "disabled", disabled );
  -    }
  -
  -    
  -    public String getName()
  -    {
  -        return getAttribute( "name" );
  -    }
  -    
  -    
  -    public void setName( String name )
  -    {
  -        setAttribute( "name", name );
  -    }
  -
  -    
  -    public boolean getReadOnly()
  -    {
  -        return getBinary( "readonly" );
  -    }
  -    
  -    
  -    public void setReadOnly( boolean readOnly )
  -    {
  -        setAttribute( "readonly", readOnly );
  -    }
  -
  -    
  -       public int getRows()
  -    {
  -        return getInteger( getAttribute( "rows" ) );
  -    }
  -    
  -    
  -    public void setRows( int rows )
  -    {
  -        setAttribute( "rows", String.valueOf( rows ) );
  -    }
  -
  -  
  -       public int getTabIndex()
  -    {
  -        return getInteger( getAttribute( "tabindex" ) );
  -    }
  -    
  -    
  -    public void setTabIndex( int tabIndex )
  -    {
  -        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  -    }
  -
  -  
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -
  -    
  -      public String getValue()
  -    {
  -        return getAttribute( "value" );
  -    }
  -    
  -    
  -    public void setValue( String value )
  -    {
  -        setAttribute( "value", value );
  -    }
  -
  -    
  -    public void blur()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    
  -    public void focus()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -    
  -    public void select()
  -    {
  -        // No scripting in server-side DOM. This method is moot.
  -    }
  -    
  -      
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTextAreaElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:28:59 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTextAreaElement
  + * @see ElementImpl
  + */
  +public class HTMLTextAreaElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTextAreaElement, HTMLFormControl
  +{
  +    
  +    
  +    public String getDefaultValue()
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        return getAttribute( "default-value" );
  +    }
  +    
  +    
  +    public void setDefaultValue( String defaultValue )
  +    {
  +        // ! NOT FULLY IMPLEMENTED !
  +        setAttribute( "default-value", defaultValue );
  +    }
  +  
  +  
  +
  +    public String getAccessKey()
  +    {
  +        String    accessKey;
  +        
  +        // Make sure that the access key is a single character.
  +        accessKey = getAttribute( "accesskey" );
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        return accessKey;
  +    }
  +    
  +    
  +    public void setAccessKey( String accessKey )
  +    {
  +        // Make sure that the access key is a single character.
  +        if ( accessKey != null && accessKey.length() > 1 )
  +            accessKey = accessKey.substring( 0, 1 );
  +        setAttribute( "accesskey", accessKey );
  +    }
  +
  +    
  +    public int getCols()
  +    {
  +        return getInteger( getAttribute( "cols" ) );
  +    }
  +    
  +    
  +    public void setCols( int cols )
  +    {
  +        setAttribute( "cols", String.valueOf( cols ) );
  +    }
  +  
  +  
  +    public boolean getDisabled()
  +    {
  +        return getBinary( "disabled" );
  +    }
  +    
  +    
  +    public void setDisabled( boolean disabled )
  +    {
  +        setAttribute( "disabled", disabled );
  +    }
  +
  +    
  +    public String getName()
  +    {
  +        return getAttribute( "name" );
  +    }
  +    
  +    
  +    public void setName( String name )
  +    {
  +        setAttribute( "name", name );
  +    }
  +
  +    
  +    public boolean getReadOnly()
  +    {
  +        return getBinary( "readonly" );
  +    }
  +    
  +    
  +    public void setReadOnly( boolean readOnly )
  +    {
  +        setAttribute( "readonly", readOnly );
  +    }
  +
  +    
  +       public int getRows()
  +    {
  +        return getInteger( getAttribute( "rows" ) );
  +    }
  +    
  +    
  +    public void setRows( int rows )
  +    {
  +        setAttribute( "rows", String.valueOf( rows ) );
  +    }
  +
  +  
  +       public int getTabIndex()
  +    {
  +        return getInteger( getAttribute( "tabindex" ) );
  +    }
  +    
  +    
  +    public void setTabIndex( int tabIndex )
  +    {
  +        setAttribute( "tabindex", String.valueOf( tabIndex ) );
  +    }
  +
  +  
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +
  +    
  +      public String getValue()
  +    {
  +        return getAttribute( "value" );
  +    }
  +    
  +    
  +    public void setValue( String value )
  +    {
  +        setAttribute( "value", value );
  +    }
  +
  +    
  +    public void blur()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    
  +    public void focus()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +    
  +    public void select()
  +    {
  +        // No scripting in server-side DOM. This method is moot.
  +    }
  +    
  +      
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTextAreaElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +69 -69    xml-xerces/java/src/org/apache/html/dom/HTMLTitleElementImpl.java
  
  Index: HTMLTitleElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLTitleElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLTitleElementImpl.java	2000/02/10 04:00:13	1.2
  +++ HTMLTitleElementImpl.java	2001/02/14 18:29:00	1.2.4.1
  @@ -54,72 +54,72 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:13 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLTitleElement
  - * @see ElementImpl
  - */
  -public final class HTMLTitleElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLTitleElement
  -{
  - 
  -    
  -    public String getText()
  -    {
  -        Node    child;
  -        String    text;
  -        
  -        // Find the Text nodes contained within this element and return their
  -        // concatenated value. Required to go around comments, entities, etc.
  -        child = getFirstChild();
  -        text = "";
  -        while ( child != null )
  -        {
  -            if ( child instanceof Text )
  -                text = text + ( (Text) child ).getData();
  -            child = child.getNextSibling();
  -        }
  -        return text;
  -    }
  -    
  -    
  -    public void setText( String text )
  -    {
  -        Node    child;
  -        Node    next;
  -        
  -        // Delete all the nodes and replace them with a single Text node.
  -        // This is the only approach that can handle comments and other nodes.
  -        child = getFirstChild();
  -        while ( child != null )
  -        {
  -            next = child.getNextSibling();
  -            removeChild( child );
  -            child = next;
  -        }
  -        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  -    }
  -
  -        
  -      /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLTitleElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:29:00 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLTitleElement
  + * @see ElementImpl
  + */
  +public class HTMLTitleElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLTitleElement
  +{
  + 
  +    
  +    public String getText()
  +    {
  +        Node    child;
  +        String    text;
  +        
  +        // Find the Text nodes contained within this element and return their
  +        // concatenated value. Required to go around comments, entities, etc.
  +        child = getFirstChild();
  +        text = "";
  +        while ( child != null )
  +        {
  +            if ( child instanceof Text )
  +                text = text + ( (Text) child ).getData();
  +            child = child.getNextSibling();
  +        }
  +        return text;
  +    }
  +    
  +    
  +    public void setText( String text )
  +    {
  +        Node    child;
  +        Node    next;
  +        
  +        // Delete all the nodes and replace them with a single Text node.
  +        // This is the only approach that can handle comments and other nodes.
  +        child = getFirstChild();
  +        while ( child != null )
  +        {
  +            next = child.getNextSibling();
  +            removeChild( child );
  +            child = next;
  +        }
  +        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
  +    }
  +
  +        
  +      /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLTitleElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  1.2.4.1   +56 -56    xml-xerces/java/src/org/apache/html/dom/HTMLUListElementImpl.java
  
  Index: HTMLUListElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/html/dom/HTMLUListElementImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.2.4.1
  diff -u -r1.2 -r1.2.4.1
  --- HTMLUListElementImpl.java	2000/02/10 04:00:13	1.2
  +++ HTMLUListElementImpl.java	2001/02/14 18:29:00	1.2.4.1
  @@ -54,59 +54,59 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -package org.apache.html.dom;
  -
  -
  -import org.w3c.dom.*;
  -import org.w3c.dom.html.*;
  -
  -
  -/**
  - * @version $Revision: 1.2 $ $Date: 2000/02/10 04:00:13 $
  - * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  - * @see org.w3c.dom.html.HTMLUListElement
  - * @see ElementImpl
  - */
  -public final class HTMLUListElementImpl
  -    extends HTMLElementImpl
  -    implements HTMLUListElement
  -{
  -    
  -    
  -    public boolean getCompact()
  -    {
  -        return getBinary( "compact" );
  -    }
  -    
  -    
  -    public void setCompact( boolean compact )
  -    {
  -        setAttribute( "compact", compact );
  -    }
  -    
  -    
  -    public String getType()
  -    {
  -        return getAttribute( "type" );
  -    }
  -    
  -    
  -    public void setType( String type )
  -    {
  -        setAttribute( "type", type );
  -    }
  -    
  -    
  -    /**
  -     * Constructor requires owner document.
  -     * 
  -     * @param owner The owner HTML document
  -     */
  -    public HTMLUListElementImpl( HTMLDocumentImpl owner, String name )
  -    {
  -        super( owner, name );
  -    }
  -
  -  
  -}
  -
  +package org.apache.html.dom;
  +
  +
  +import org.w3c.dom.*;
  +import org.w3c.dom.html.*;
  +
  +
  +/**
  + * @version $Revision: 1.2.4.1 $ $Date: 2001/02/14 18:29:00 $
  + * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
  + * @see org.w3c.dom.html.HTMLUListElement
  + * @see ElementImpl
  + */
  +public class HTMLUListElementImpl
  +    extends HTMLElementImpl
  +    implements HTMLUListElement
  +{
  +    
  +    
  +    public boolean getCompact()
  +    {
  +        return getBinary( "compact" );
  +    }
  +    
  +    
  +    public void setCompact( boolean compact )
  +    {
  +        setAttribute( "compact", compact );
  +    }
  +    
  +    
  +    public String getType()
  +    {
  +        return getAttribute( "type" );
  +    }
  +    
  +    
  +    public void setType( String type )
  +    {
  +        setAttribute( "type", type );
  +    }
  +    
  +    
  +    /**
  +     * Constructor requires owner document.
  +     * 
  +     * @param owner The owner HTML document
  +     */
  +    public HTMLUListElementImpl( HTMLDocumentImpl owner, String name )
  +    {
  +        super( owner, name );
  +    }
  +
  +  
  +}
  +
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.19.2.3  +952 -16   xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java
  
  Index: AttrImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java,v
  retrieving revision 1.19.2.2
  retrieving revision 1.19.2.3
  diff -u -r1.19.2.2 -r1.19.2.3
  --- AttrImpl.java	2000/12/12 19:07:34	1.19.2.2
  +++ AttrImpl.java	2001/02/14 18:29:12	1.19.2.3
  @@ -57,6 +57,8 @@
   
   package org.apache.xerces.dom;
   
  +import java.io.*;
  +
   import org.w3c.dom.*;
   import org.w3c.dom.events.MutationEvent;
   import org.apache.xerces.dom.events.MutationEventImpl;
  @@ -96,13 +98,49 @@
    * <P>
    * AttrImpl does not support Namespaces. AttrNSImpl, which inherits from
    * it, does.
  + *
  + * <p>AttrImpl used to inherit from ParentNode. It now directly inherits from
  + * NodeImpl and provide its own implementation of the ParentNode's behavior.
  + * The reason is that we now try and avoid to always creating a Text node to
  + * hold the value of an attribute. The DOM spec requires it, so we still have
  + * to do it in case getFirstChild() is called for instance. The reason
  + * attribute values are stored as a list of nodes is so that they can carry
  + * more than a simple string. They can also contain EntityReference nodes.
  + * However, most of the times people only have a single string that they only
  + * set and get through Element.set/getAttribute or Attr.set/getValue. In this
  + * new version, the Attr node has a value pointer which can either be the
  + * String directly or a pointer to the first ChildNode. A flag tells which one
  + * it currently is. Note that while we try to stick with the direct String as
  + * much as possible once we've switched to a node there is no going back. This
  + * is because we have no way to know whether the application keeps referring to
  + * the node we once returned.
  + * <p> The gain in memory varies on the density of attributes in the document.
  + * But in the tests I've run I've seen up to 12% of memory gain. And the good
  + * thing is that it also leads to a slight gain in speed because we allocate
  + * fewer objects! I mean, that's until we have to actually create the node...
  + * <p>
  + * To avoid too much duplicated code, I got rid of ParentNode and renamed
  + * ChildAndParentNode, which I never really liked, to ParentNode for
  + * simplicity, this doesn't make much of a difference in memory usage because
  + * there are only very objects that are only a Parent. This is only true now
  + * because AttrImpl now inherits directly from NodeImpl and has its own
  + * implementation of the ParentNode's node behavior. So there is still some
  + * duplicated code there.
  + *
  + * <p><b>WARNING</b>: Some of the code here is partially duplicated in
  + * ParentNode, be careful to keep these two classes in sync!
  + *
    * @see AttrNSImpl
    *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
    * @version
  - * @since  PR-DOM-Level-1-19980818.
  + * @since PR-DOM-Level-1-19980818.
  + *
    */
   public class AttrImpl
  -    extends ParentNode
  +    extends NodeImpl
       implements Attr {
   
       //
  @@ -116,9 +154,14 @@
       // Data
       //
   
  +    /** This can either be a String or the first child node. */
  +    protected Object value = null;
  +
       /** Attribute name. */
       protected String name;
   
  +    protected static TextImpl textNode = null;
  +
       //
       // Constructors
       //
  @@ -132,17 +175,70 @@
           this.name = name;
           /** False for default attributes. */
           isSpecified(true);
  +        hasStringValue(true);
       }
   
       // for AttrNS
       protected AttrImpl() {}
   
  +    // create a real text node as child if we don't have one yet
  +    protected void makeChildNode() {
  +        if (hasStringValue()) {
  +            if (value != null) {
  +                TextImpl text =
  +                    (TextImpl) ownerDocument().createTextNode((String) value);
  +                value = text;
  +                text.isFirstChild(true);
  +                text.previousSibling = text;
  +                text.ownerNode = this;
  +                text.isOwned(true);
  +            }
  +            hasStringValue(false);
  +        }
  +    }
  +
  +    /**
  +     * NON-DOM
  +     * set the ownerDocument of this node and its children
  +     */
  +    void setOwnerDocument(DocumentImpl doc) {
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        super.setOwnerDocument(doc);
  +        if (!hasStringValue()) {
  +            for (ChildNode child = (ChildNode) value;
  +                 child != null; child = child.nextSibling) {
  +                child.setOwnerDocument(doc);
  +            }
  +        }
  +    }
  +
       //
       // Node methods
       //
       
       public Node cloneNode(boolean deep) {
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
           AttrImpl clone = (AttrImpl) super.cloneNode(deep);
  +
  +        // take care of case where there are kids
  +    	if (!clone.hasStringValue()) {
  +
  +            // Need to break the association w/ original kids
  +            clone.value = null;
  +
  +            // Then, if deep, clone the kids too.
  +            if (deep) {
  +                for (Node child = (Node) value; child != null;
  +                     child = child.getNextSibling()) {
  +                    clone.appendChild(child.cloneNode(true));
  +                }
  +            }
  +        }
           clone.isSpecified(true);
           return clone;
       }
  @@ -207,16 +303,16 @@
        * as "remove all children", which from outside should appear
        * similar to setting it to the empty string.
        */
  -    public void setValue(String value) {
  +    public void setValue(String newvalue) {
   
       	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
       		
           LCount lc=null;
           String oldvalue="";
  +        DocumentImpl ownerDocument = ownerDocument();
           if(MUTATIONEVENTS && ownerDocument.mutationEvents)
           {
               // MUTATION PREPROCESSING AND PRE-EVENTS:
  @@ -238,19 +334,43 @@
               if (needsSyncChildren()) {
                   synchronizeChildren();
               }
  -            while(firstChild!=null)
  -                internalRemoveChild(firstChild,MUTATION_LOCAL);
  +            if (value != null) {
  +                if (hasStringValue()) {
  +                    // temporarily sets an actual text node as our child so
  +                    // that we can use it in the event
  +                    if (textNode == null) {
  +                        textNode = (TextImpl)
  +                            ownerDocument.createTextNode((String) value);
  +                    }
  +                    else {
  +                        textNode.data = (String) value;
  +                    }
  +                    value = textNode;
  +                    textNode.isFirstChild(true);
  +                    textNode.previousSibling = textNode;
  +                    textNode.ownerNode = this;
  +                    textNode.isOwned(true);
  +                    hasStringValue(false);
  +                    internalRemoveChild(textNode, MUTATION_LOCAL);
  +                }
  +                else {
  +                    while (value != null) {
  +                        internalRemoveChild((Node) value, MUTATION_LOCAL);
  +                    }
  +                }
  +            }
           }
           else
           {
  -            // simply discard children
  -            if (firstChild != null) {
  +            // simply discard children if any
  +            if (!hasStringValue() && value != null) {
                   // remove ref from first child to last child
  +                ChildNode firstChild = (ChildNode) value;
                   firstChild.previousSibling = null;
                   firstChild.isFirstChild(false);
  -                // then remove ref to first child
  -                firstChild   = null;
               }
  +            // then remove ref to current value
  +            value = null;
               needsSyncChildren(false);
           }
   
  @@ -260,9 +380,17 @@
           // Note that aggregate events are NOT dispatched here,
           // since we need to combine the remove and insert.
       	isSpecified(true);
  -        if (value != null) {
  -            internalInsertBefore(ownerDocument.createTextNode(value),null,
  -                                 MUTATION_LOCAL);
  +        if (newvalue != null) {
  +            if(MUTATIONEVENTS && ownerDocument.mutationEvents) {
  +                // if there are any event handlers create a real node
  +                internalInsertBefore(ownerDocument.createTextNode(newvalue),
  +                                     null, MUTATION_LOCAL);
  +                hasStringValue(false);
  +            } else {
  +                // directly store the string
  +                value = newvalue;
  +                hasStringValue(true);
  +            }
           }
   		
       	changed(); // ***** Is this redundant?
  @@ -284,9 +412,13 @@
           if (needsSyncChildren()) {
               synchronizeChildren();
           }
  -        if (firstChild == null) {
  +        if (value == null) {
               return "";
           }
  +        if (hasStringValue()) {
  +            return (String) value;
  +        }
  +        ChildNode firstChild = ((ChildNode) value);
           ChildNode node = firstChild.nextSibling;
           if (node == null) {
               return firstChild.getNodeValue();
  @@ -353,7 +485,13 @@
       
       public void normalize() {
   
  +        // No need to normalize if already normalized or
  +        // if value is kept as a String.
  +        if (isNormalized() || hasStringValue())
  +            return;
  +
           Node kid, next;
  +        ChildNode firstChild = (ChildNode)value;
           for (kid = firstChild; kid != null; kid = next) {
               next = kid.getNextSibling();
   
  @@ -380,6 +518,7 @@
               }
           }
   
  +        isNormalized(true);
       } // normalize()
   
       //
  @@ -404,5 +543,802 @@
       public String toString() {
       	return getName() + "=" + "\"" + getValue() + "\"";
       }
  +
  +    /**
  +     * Test whether this node has any children. Convenience shorthand
  +     * for (Node.getFirstChild()!=null)
  +     */
  +    public boolean hasChildNodes() {
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        return value != null;
  +    }
  +
  +    /**
  +     * Obtain a NodeList enumerating all children of this node. If there
  +     * are none, an (initially) empty NodeList is returned.
  +     * <p>
  +     * NodeLists are "live"; as children are added/removed the NodeList
  +     * will immediately reflect those changes. Also, the NodeList refers
  +     * to the actual nodes, so changes to those nodes made via the DOM tree
  +     * will be reflected in the NodeList and vice versa.
  +     * <p>
  +     * In this implementation, Nodes implement the NodeList interface and
  +     * provide their own getChildNodes() support. Other DOMs may solve this
  +     * differently.
  +     */
  +    public NodeList getChildNodes() {
  +        // JKESS: KNOWN ISSUE HERE 
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        return this;
  +
  +    } // getChildNodes():NodeList
  +
  +    /** The first child of this Node, or null if none. */
  +    public Node getFirstChild() {
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        makeChildNode();
  +    	return (Node) value;
  +
  +    }   // getFirstChild():Node
  +
  +    /** The last child of this Node, or null if none. */
  +    public Node getLastChild() {
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        return lastChild();
  +
  +    } // getLastChild():Node
  +
  +    final ChildNode lastChild() {
  +        // last child is stored as the previous sibling of first child
  +        makeChildNode();
  +        return value != null ? ((ChildNode) value).previousSibling : null;
  +    }
  +
  +    final void lastChild(ChildNode node) {
  +        // store lastChild as previous sibling of first child
  +        if (value != null) {
  +            ((ChildNode) value).previousSibling = node;
  +        }
  +    }
  +
  +    /**
  +     * Move one or more node(s) to our list of children. Note that this
  +     * implicitly removes them from their previous parent.
  +     *
  +     * @param newChild The Node to be moved to our subtree. As a
  +     * convenience feature, inserting a DocumentNode will instead insert
  +     * all its children.
  +     *
  +     * @param refChild Current child which newChild should be placed
  +     * immediately before. If refChild is null, the insertion occurs
  +     * after all existing Nodes, like appendChild().
  +     *
  +     * @returns newChild, in its new state (relocated, or emptied in the
  +     * case of DocumentNode.)
  +     *
  +     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
  +     * type that shouldn't be a child of this node, or if newChild is an
  +     * ancestor of this node.
  +     *
  +     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
  +     * different owner document than we do.
  +     *
  +     * @throws DOMException(NOT_FOUND_ERR) if refChild is not a child of
  +     * this node.
  +     *
  +     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
  +     * read-only.
  +     */
  +    public Node insertBefore(Node newChild, Node refChild) 
  +        throws DOMException {
  +        // Tail-call; optimizer should be able to do good things with.
  +        return internalInsertBefore(newChild,refChild,MUTATION_ALL);
  +    } // insertBefore(Node,Node):Node
  +     
  +    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
  +     * to control which mutation events are spawned. This version of the
  +     * insertBefore operation allows us to do so. It is not intended
  +     * for use by application programs.
  +     */
  +    Node internalInsertBefore(Node newChild, Node refChild,int mutationMask) 
  +        throws DOMException {
  +
  +        DocumentImpl ownerDocument = ownerDocument();
  +        boolean errorChecking = ownerDocument.errorChecking;
  +
  +        if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) {
  +            // SLOW BUT SAFE: We could insert the whole subtree without
  +            // juggling so many next/previous pointers. (Wipe out the
  +            // parent's child-list, patch the parent pointers, set the
  +            // ends of the list.) But we know some subclasses have special-
  +            // case behavior they add to insertBefore(), so we don't risk it.
  +            // This approch also takes fewer bytecodes.
  +
  +            // NOTE: If one of the children is not a legal child of this
  +            // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children
  +            // have been transferred. (Alternative behaviors would be to
  +            // reparent up to the first failure point or reparent all those
  +            // which are acceptable to the target node, neither of which is
  +            // as robust. PR-DOM-0818 isn't entirely clear on which it
  +            // recommends?????
  +
  +            // No need to check kids for right-document; if they weren't,
  +            // they wouldn't be kids of that DocFrag.
  +            if (errorChecking) {
  +                for (Node kid = newChild.getFirstChild(); // Prescan
  +                     kid != null; kid = kid.getNextSibling()) {
  +
  +                    if (!ownerDocument.isKidOK(this, kid)) {
  +                        throw new DOMException(
  +                                           DOMException.HIERARCHY_REQUEST_ERR, 
  +                                           "DOM006 Hierarchy request error");
  +                    }
  +                }
  +            }
  +
  +            while (newChild.hasChildNodes()) {
  +                insertBefore(newChild.getFirstChild(), refChild);
  +            }
  +            return newChild;
  +        }
  +
  +        if (newChild == refChild) {
  +            // stupid case that must be handled as a no-op triggering events...
  +            refChild = refChild.getNextSibling();
  +            removeChild(newChild);
  +            insertBefore(newChild, refChild);
  +            return newChild;
  +        }
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +
  +        if (errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                       "DOM001 Modification not allowed");
  +            }
  +            if (newChild.getOwnerDocument() != ownerDocument) {
  +                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  +                                       "DOM005 Wrong document");
  +            }
  +            if (!ownerDocument.isKidOK(this, newChild)) {
  +                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                       "DOM006 Hierarchy request error");
  +            }
  +            // refChild must be a child of this node (or null)
  +            if (refChild != null && refChild.getParentNode() != this) {
  +                throw new DOMException(DOMException.NOT_FOUND_ERR,
  +                                       "DOM008 Not found");
  +            }
  +
  +            // Prevent cycles in the tree
  +            // newChild cannot be ancestor of this Node,
  +            // and actually cannot be this
  +            boolean treeSafe = true;
  +            for (NodeImpl a = this; treeSafe && a != null; a = a.parentNode())
  +            {
  +                treeSafe = newChild != a;
  +            }
  +            if (!treeSafe) {
  +                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                       "DOM006 Hierarchy request error");
  +            }
  +        }
  +
  +        makeChildNode(); // make sure we have a node and not a string
  +
  +        EnclosingAttr enclosingAttr=null;
  +        if (MUTATIONEVENTS && ownerDocument.mutationEvents
  +            && (mutationMask&MUTATION_AGGREGATE)!=0) {
  +            // MUTATION PREPROCESSING
  +            // No direct pre-events, but if we're within the scope 
  +            // of an Attr and DOMAttrModified was requested,
  +            // we need to preserve its previous value.
  +            LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
  +            if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                enclosingAttr=getEnclosingAttr();
  +            }
  +        }
  +
  +        // Convert to internal type, to avoid repeated casting
  +        ChildNode newInternal = (ChildNode)newChild;
  +
  +        Node oldparent = newInternal.parentNode();
  +        if (oldparent != null) {
  +            oldparent.removeChild(newInternal);
  +        }
  +
  +        // Convert to internal type, to avoid repeated casting
  +        ChildNode refInternal = (ChildNode) refChild;
  +
  +        // Attach up
  +        newInternal.ownerNode = this;
  +        newInternal.isOwned(true);
  +
  +        // Attach before and after
  +        // Note: firstChild.previousSibling == lastChild!!
  +        ChildNode firstChild = (ChildNode) value;
  +        if (firstChild == null) {
  +            // this our first and only child
  +            value = newInternal; // firstchild = newInternal;
  +            newInternal.isFirstChild(true);
  +            newInternal.previousSibling = newInternal;
  +        }
  +        else {
  +            if (refInternal == null) {
  +                // this is an append
  +                ChildNode lastChild = firstChild.previousSibling;
  +                lastChild.nextSibling = newInternal;
  +                newInternal.previousSibling = lastChild;
  +                firstChild.previousSibling = newInternal;
  +            }
  +            else {
  +                // this is an insert
  +                if (refChild == firstChild) {
  +                    // at the head of the list
  +                    firstChild.isFirstChild(false);
  +                    newInternal.nextSibling = firstChild;
  +                    newInternal.previousSibling = firstChild.previousSibling;
  +                    firstChild.previousSibling = newInternal;
  +                    value = newInternal; // firstChild = newInternal;
  +                    newInternal.isFirstChild(true);
  +                }
  +                else {
  +                    // somewhere in the middle
  +                    ChildNode prev = refInternal.previousSibling;
  +                    newInternal.nextSibling = refInternal;
  +                    prev.nextSibling = newInternal;
  +                    refInternal.previousSibling = newInternal;
  +                    newInternal.previousSibling = prev;
  +                }
  +            }
  +        }
  +
  +        changed();
  +
  +        if (MUTATIONEVENTS && ownerDocument.mutationEvents) {
  +            // MUTATION POST-EVENTS:
  +            // "Local" events (non-aggregated)
  +            if ((mutationMask&MUTATION_LOCAL) != 0) {
  +                // New child is told it was inserted, and where
  +                LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED);
  +                if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                    MutationEvent me= new MutationEventImpl();
  +                    me.initMutationEvent(MutationEventImpl.DOM_NODE_INSERTED,
  +                                         true,false,this,null,
  +                                         null,null,(short)0);
  +                    newInternal.dispatchEvent(me);
  +                }
  +
  +                // If within the Document, tell the subtree it's been added
  +                // to the Doc.
  +                lc=LCount.lookup(
  +                            MutationEventImpl.DOM_NODE_INSERTED_INTO_DOCUMENT);
  +                if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                    NodeImpl eventAncestor=this;
  +                    if (enclosingAttr!=null) 
  +                        eventAncestor=
  +                            (NodeImpl)(enclosingAttr.node.getOwnerElement());
  +                    if (eventAncestor!=null) { // Might have been orphan Attr
  +                        NodeImpl p=eventAncestor;
  +                        while (p!=null) {
  +                            eventAncestor=p; // Last non-null ancestor
  +                            // In this context, ancestry includes
  +                            // walking back from Attr to Element
  +                            if (p.getNodeType()==ATTRIBUTE_NODE) {
  +                                p=(ElementImpl)((AttrImpl)p).getOwnerElement();
  +                            }
  +                            else {
  +                                p=p.parentNode();
  +                            }
  +                        }
  +                        if (eventAncestor.getNodeType()==Node.DOCUMENT_NODE) {
  +                            MutationEvent me= new MutationEventImpl();
  +                            me.initMutationEvent(MutationEventImpl
  +                                              .DOM_NODE_INSERTED_INTO_DOCUMENT,
  +                                                 false,false,null,null,
  +                                                 null,null,(short)0);
  +                            dispatchEventToSubtree(newInternal,me);
  +                        }
  +                    }
  +                }
  +            }
  +
  +            // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified
  +            // (Common to most kinds of mutation)
  +            if ((mutationMask&MUTATION_AGGREGATE) != 0) {
  +                dispatchAggregateEvents(enclosingAttr);
  +            }
  +        }
  +
  +        checkNormalizationAfterInsert(newInternal);
  +
  +        return newChild;
  +
  +    } // internalInsertBefore(Node,Node,int):Node
  +
  +    /**
  +     * Remove a child from this Node. The removed child's subtree
  +     * remains intact so it may be re-inserted elsewhere.
  +     *
  +     * @return oldChild, in its new state (removed).
  +     *
  +     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
  +     * this node.
  +     *
  +     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
  +     * read-only.
  +     */
  +    public Node removeChild(Node oldChild) 
  +        throws DOMException {
  +        // Tail-call, should be optimizable
  +        if (hasStringValue()) {
  +            // we don't have any child per say so it can't be one of them!
  +            throw new DOMException(DOMException.NOT_FOUND_ERR, 
  +                                   "DOM008 Not found");
  +        }
  +        return internalRemoveChild(oldChild,MUTATION_ALL);
  +    } // removeChild(Node) :Node
  +     
  +    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
  +     * to control which mutation events are spawned. This version of the
  +     * removeChild operation allows us to do so. It is not intended
  +     * for use by application programs.
  +     */
  +    Node internalRemoveChild(Node oldChild,int mutationMask)
  +        throws DOMException {
  +
  +        DocumentImpl ownerDocument = ownerDocument();
  +        if (ownerDocument.errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +            if (oldChild != null && oldChild.getParentNode() != this) {
  +                throw new DOMException(DOMException.NOT_FOUND_ERR, 
  +                                       "DOM008 Not found");
  +            }
  +        }
  +
  +        // notify document
  +        ownerDocument.removedChildNode(oldChild);
  +
  +        ChildNode oldInternal = (ChildNode) oldChild;
  +
  +        EnclosingAttr enclosingAttr=null;
  +        if(MUTATIONEVENTS && ownerDocument.mutationEvents)
  +        {
  +            // MUTATION PREPROCESSING AND PRE-EVENTS:
  +            // If we're within the scope of an Attr and DOMAttrModified 
  +            // was requested, we need to preserve its previous value for
  +            // that event.
  +            LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
  +            if(lc.captures+lc.bubbles+lc.defaults>0)
  +            {
  +                enclosingAttr=getEnclosingAttr();
  +            }
  +            
  +            if( (mutationMask&MUTATION_LOCAL) != 0)
  +            {
  +                // Child is told that it is about to be removed
  +                lc=LCount.lookup(MutationEventImpl.DOM_NODE_REMOVED);
  +                if(lc.captures+lc.bubbles+lc.defaults>0)
  +                {
  +                    MutationEvent me= new MutationEventImpl();
  +                    me.initMutationEvent(MutationEventImpl.DOM_NODE_REMOVED,
  +                                         true,false,this,null,
  +                                         null,null,(short)0);
  +                    oldInternal.dispatchEvent(me);
  +                }
  +            
  +                // If within Document, child's subtree is informed that it's
  +                // losing that status
  +                lc=LCount.lookup(
  +                             MutationEventImpl.DOM_NODE_REMOVED_FROM_DOCUMENT);
  +                if(lc.captures+lc.bubbles+lc.defaults>0)
  +                {
  +                    NodeImpl eventAncestor=this;
  +                    if(enclosingAttr!=null) 
  +                        eventAncestor=
  +                            (NodeImpl) enclosingAttr.node.getOwnerElement();
  +                    if(eventAncestor!=null) // Might have been orphan Attr
  +                    {
  +                        for(NodeImpl p=eventAncestor.parentNode();
  +                            p!=null;
  +                            p=p.parentNode())
  +                        {
  +                            eventAncestor=p; // Last non-null ancestor
  +                        }
  +                        if(eventAncestor.getNodeType()==Node.DOCUMENT_NODE)
  +                        {
  +                            MutationEvent me= new MutationEventImpl();
  +                            me.initMutationEvent(MutationEventImpl
  +                                               .DOM_NODE_REMOVED_FROM_DOCUMENT,
  +                                                 false,false,
  +                                                 null,null,null,null,(short)0);
  +                            dispatchEventToSubtree(oldInternal,me);
  +                        }
  +                    }
  +                }
  +            }
  +        } // End mutation preprocessing
  +
  +        // Patch linked list around oldChild
  +        // Note: lastChild == firstChild.previousSibling
  +        if (oldInternal == value) { // oldInternal == firstChild
  +            // removing first child
  +            oldInternal.isFirstChild(false);
  +            value = oldInternal.nextSibling; // firstChild = oldInternal.nextSibling
  +            ChildNode firstChild = (ChildNode) value;
  +            if (firstChild != null) {
  +                firstChild.isFirstChild(true);
  +                firstChild.previousSibling = oldInternal.previousSibling;
  +            }
  +        } else {
  +            ChildNode prev = oldInternal.previousSibling;
  +            ChildNode next = oldInternal.nextSibling;
  +            prev.nextSibling = next;
  +            if (next == null) {
  +                // removing last child
  +                ChildNode firstChild = (ChildNode) value;
  +                firstChild.previousSibling = prev;
  +            } else {
  +                // removing some other child in the middle
  +                next.previousSibling = prev;
  +            }
  +        }
  +
  +        // Save previous sibling for normalization checking.
  +        ChildNode oldPreviousSibling = oldInternal.previousSibling();
  +
  +        // Remove oldInternal's references to tree
  +        oldInternal.ownerNode       = ownerDocument;
  +        oldInternal.isOwned(false);
  +        oldInternal.nextSibling     = null;
  +        oldInternal.previousSibling = null;
  +
  +        changed();
  +
  +        if(MUTATIONEVENTS && ownerDocument.mutationEvents)
  +        {
  +            // MUTATION POST-EVENTS:
  +            // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
  +            // if required. (Common to most kinds of mutation)
  +            if( (mutationMask&MUTATION_AGGREGATE) != 0)
  +                dispatchAggregateEvents(enclosingAttr);
  +        } // End mutation postprocessing
  +
  +        checkNormalizationAfterRemove(oldPreviousSibling);
  +
  +        return oldInternal;
  +
  +    } // internalRemoveChild(Node,int):Node
  +
  +    /**
  +     * Make newChild occupy the location that oldChild used to
  +     * have. Note that newChild will first be removed from its previous
  +     * parent, if any. Equivalent to inserting newChild before oldChild,
  +     * then removing oldChild.
  +     *
  +     * @returns oldChild, in its new state (removed).
  +     *
  +     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
  +     * type that shouldn't be a child of this node, or if newChild is
  +     * one of our ancestors.
  +     *
  +     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
  +     * different owner document than we do.
  +     *
  +     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
  +     * this node.
  +     *
  +     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
  +     * read-only.
  +     */
  +    public Node replaceChild(Node newChild, Node oldChild)
  +        throws DOMException {
  +
  +        makeChildNode();
  +
  +        // If Mutation Events are being generated, this operation might
  +        // throw aggregate events twice when modifying an Attr -- once 
  +        // on insertion and once on removal. DOM Level 2 does not specify 
  +        // this as either desirable or undesirable, but hints that
  +        // aggregations should be issued only once per user request.
  +
  +        EnclosingAttr enclosingAttr=null;
  +        DocumentImpl ownerDocument = ownerDocument();
  +        if(MUTATIONEVENTS && ownerDocument.mutationEvents)
  +        {
  +            // MUTATION PREPROCESSING AND PRE-EVENTS:
  +            // If we're within the scope of an Attr and DOMAttrModified 
  +            // was requested, we need to preserve its previous value for
  +            // that event.
  +            LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
  +            if(lc.captures+lc.bubbles+lc.defaults>0)
  +            {
  +                enclosingAttr=getEnclosingAttr();
  +            }
  +        } // End mutation preprocessing
  +
  +        internalInsertBefore(newChild, oldChild,MUTATION_LOCAL);
  +        if (newChild != oldChild) {
  +            internalRemoveChild(oldChild,MUTATION_LOCAL);
  +        }
  +
  +        if(MUTATIONEVENTS && ownerDocument.mutationEvents)
  +        {
  +            dispatchAggregateEvents(enclosingAttr);
  +        }
  +
  +        return oldChild;
  +    }
  +
  +    //
  +    // NodeList methods
  +    //
  +
  +    /**
  +     * NodeList method: Count the immediate children of this node
  +     * @return int
  +     */
  +    public int getLength() {
  +
  +        if (hasStringValue()) {
  +            return 1;
  +        }
  +        ChildNode node = (ChildNode) value;
  +        int length = 0;
  +        for (; node != null; node = node.nextSibling) {
  +            length++;
  +        }
  +        return length;
  +
  +    } // getLength():int
  +
  +    /**
  +     * NodeList method: Return the Nth immediate child of this node, or
  +     * null if the index is out of bounds.
  +     * @return org.w3c.dom.Node
  +     * @param Index int
  +     */
  +    public Node item(int index) {
  +
  +        if (hasStringValue()) {
  +            if (index != 0 || value == null) {
  +                return null;
  +            }
  +            else {
  +                makeChildNode();
  +                return (Node) value;
  +            }
  +        }
  +        ChildNode node = (ChildNode) value;
  +        for (int i = 0; i < index && node != null; i++) {
  +            node = node.nextSibling;
  +        }
  +        return node;
  +
  +    } // item(int):Node
  +
  +    //
  +    // DOM2: methods, getters, setters
  +    //
  +
  +    //
  +    // Public methods
  +    //
  +
  +    /**
  +     * Override default behavior so that if deep is true, children are also
  +     * toggled.
  +     * @see Node
  +     * <P>
  +     * Note: this will not change the state of an EntityReference or its
  +     * children, which are always read-only.
  +     */
  +    public void setReadOnly(boolean readOnly, boolean deep) {
  +
  +        super.setReadOnly(readOnly, deep);
  +
  +        if (deep) {
  +
  +            if (needsSyncChildren()) {
  +                synchronizeChildren();
  +            }
  +
  +            if (hasStringValue()) {
  +                return;
  +            }
  +            // Recursively set kids
  +            for (ChildNode mykid = (ChildNode) value;
  +                 mykid != null;
  +                 mykid = mykid.nextSibling) {
  +                if (mykid.getNodeType() != Node.ENTITY_REFERENCE_NODE) {
  +                    mykid.setReadOnly(readOnly,true);
  +                }
  +            }
  +        }
  +    } // setReadOnly(boolean,boolean)
  +
  +    //
  +    // Protected methods
  +    //
  +
  +    /**
  +     * Override this method in subclass to hook in efficient
  +     * internal data structure.
  +     */
  +    protected void synchronizeChildren() {
  +        // By default just change the flag to avoid calling this method again
  +        needsSyncChildren(false);
  +    }
  +
  +    /**
  +     * Synchronizes the node's children with the internal structure.
  +     * Fluffing the children at once solves a lot of work to keep
  +     * the two structures in sync. The problem gets worse when
  +     * editing the tree -- this makes it a lot easier.
  +     * Even though this is only used in deferred classes this method is
  +     * put here so that it can be shared by all deferred classes.
  +     */
  +    /***
  +    protected final void synchronizeChildren(int nodeIndex) {
  +
  +        // we don't want to generate any event for this so turn them off
  +        DeferredDocumentImpl ownerDocument =
  +            (DeferredDocumentImpl) ownerDocument();
  +        boolean orig = ownerDocument.mutationEvents;
  +        ownerDocument.mutationEvents = false;
  +
  +        // no need to sync in the future
  +        needsSyncChildren(false);
  +
  +        // create children and link them as siblings or simply store the value
  +        // as a String if all we have is one piece of text
  +        int last = ownerDocument.getLastChild(nodeIndex);
  +        int prev = ownerDocument.getPrevSibling(last);
  +        if (prev == -1) {
  +            value = ownerDocument.getNodeValueString(last);
  +            hasStringValue(true);
  +        }
  +        else {
  +            ChildNode firstNode = null;
  +            ChildNode lastNode = null;
  +            for (int index = last; index != -1;
  +                 index = ownerDocument.getPrevSibling(index)) {
  +
  +                ChildNode node = (ChildNode)ownerDocument.getNodeObject(index);
  +                if (lastNode == null) {
  +                    lastNode = node;
  +                }
  +                else {
  +                    firstNode.previousSibling = node;
  +                }
  +                node.ownerNode = this;
  +                node.isOwned(true);
  +                node.nextSibling = firstNode;
  +                firstNode = node;
  +            }
  +            if (lastNode != null) {
  +                value = firstNode; // firstChild = firstNode
  +                firstNode.isFirstChild(true);
  +                lastChild(lastNode);
  +            }
  +            hasStringValue(false);
  +        }
  +
  +        // set mutation events flag back to its original value
  +        ownerDocument.mutationEvents = orig;
  +
  +    } // synchronizeChildren()
  +    /***/
  +
  +    /**
  +     * Checks the normalized state of this node after inserting a child.
  +     * If the inserted child causes this node to be unnormalized, then this
  +     * node is flagged accordingly.
  +     * The conditions for changing the normalized state are:
  +     * <ul>
  +     * <li>The inserted child is a text node and one of its adjacent siblings
  +     * is also a text node.
  +     * <li>The inserted child is is itself unnormalized.
  +     * </ul>
  +     *
  +     * @param insertedChild the child node that was inserted into this node
  +     *
  +     * @throws NullPointerException if the inserted child is <code>null</code>
  +     */
  +    void checkNormalizationAfterInsert(ChildNode insertedChild) {
  +        // See if insertion caused this node to be unnormalized.
  +        if (insertedChild.getNodeType() == Node.TEXT_NODE) {
  +            ChildNode prev = insertedChild.previousSibling();
  +            ChildNode next = insertedChild.nextSibling;
  +            // If an adjacent sibling of the new child is a text node,
  +            // flag this node as unnormalized.
  +            if ((prev != null && prev.getNodeType() == Node.TEXT_NODE) ||
  +                (next != null && next.getNodeType() == Node.TEXT_NODE)) {
  +                isNormalized(false);
  +            }
  +        }
  +        else {
  +            // If the new child is not normalized,
  +            // then this node is inherently not normalized.
  +            if (!insertedChild.isNormalized()) {
  +                isNormalized(false);
  +            }
  +        }
  +    } // checkNormalizationAfterInsert(ChildNode)
  +
  +    /**
  +     * Checks the normalized of this node after removing a child.
  +     * If the removed child causes this node to be unnormalized, then this
  +     * node is flagged accordingly.
  +     * The conditions for changing the normalized state are:
  +     * <ul>
  +     * <li>The removed child had two adjacent siblings that were text nodes.
  +     * </ul>
  +     *
  +     * @param previousSibling the previous sibling of the removed child, or
  +     * <code>null</code>
  +     */
  +    void checkNormalizationAfterRemove(ChildNode previousSibling) {
  +        // See if removal caused this node to be unnormalized.
  +        // If the adjacent siblings of the removed child were both text nodes,
  +        // flag this node as unnormalized.
  +        if (previousSibling != null &&
  +            previousSibling.getNodeType() == Node.TEXT_NODE) {
  +
  +            ChildNode next = previousSibling.nextSibling;
  +            if (next != null && next.getNodeType() == Node.TEXT_NODE) {
  +                isNormalized(false);
  +            }
  +        }
  +    } // checkNormalizationAfterRemove(ChildNode)
  +
  +    //
  +    // Serialization methods
  +    //
  +
  +    /** Serialize object. */
  +    private void writeObject(ObjectOutputStream out) throws IOException {
  +
  +        // synchronize chilren
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        // write object
  +        out.defaultWriteObject();
  +
  +    } // writeObject(ObjectOutputStream)
  +
  +    /** Deserialize object. */
  +    private void readObject(ObjectInputStream ois)
  +        throws ClassNotFoundException, IOException {
  +
  +        // perform default deseralization
  +        ois.defaultReadObject();
  +
  +        // hardset synchildren - so we don't try to sync- it does not make any sense
  +        // to try to synchildren when we just desealize object.
  +
  +        needsSyncChildren(false);
  +
  +    } // readObject(ObjectInputStream)
   
   } // class AttrImpl
  
  
  
  1.15.4.3  +62 -34    xml-xerces/java/src/org/apache/xerces/dom/AttrNSImpl.java
  
  Index: AttrNSImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttrNSImpl.java,v
  retrieving revision 1.15.4.2
  retrieving revision 1.15.4.3
  diff -u -r1.15.4.2 -r1.15.4.3
  --- AttrNSImpl.java	2000/12/12 19:07:34	1.15.4.2
  +++ AttrNSImpl.java	2001/02/14 18:29:13	1.15.4.3
  @@ -1,4 +1,4 @@
  -/* $Id: AttrNSImpl.java,v 1.15.4.2 2000/12/12 19:07:34 lehors Exp $ */
  +/* $Id: AttrNSImpl.java,v 1.15.4.3 2001/02/14 18:29:13 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -68,6 +68,9 @@
    * The qualified name is the node name, and we store localName which is also
    * used in all queries. On the other hand we recompute the prefix when
    * necessary.
  + * @author Arnaud  Le Hors, IBM
  + * @author Andy Clark, IBM
  + * @author Ralf Pfeiffer, IBM
    */
   public class AttrNSImpl
       extends AttrImpl {
  @@ -78,6 +81,8 @@
   
       /** Serialization version. */
       static final long serialVersionUID = -781906615369795414L;
  +    static final String xmlnsURI = "http://www.w3.org/2000/xmlns/";
  +    static final String xmlURI = "http://www.w3.org/XML/1998/namespace";
   
       //
       // Data
  @@ -96,36 +101,47 @@
   			 String qualifiedName) {
   
       	super(ownerDocument, qualifiedName);
  -    	if (!DocumentImpl.isXMLName(qualifiedName)) {
  -    	    throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  -    	                               "DOM002 Illegal character");
  -        }
   
           int index = qualifiedName.indexOf(':');
           String prefix;
           if (index < 0) {
               prefix = null;
               localName = qualifiedName;
  -        } 
  +
  +            if (ownerDocument.errorChecking &&
  +                qualifiedName.equals("xmlns") &&
  +                (namespaceURI == null || !namespaceURI.equals(xmlnsURI))) {
  +
  +                throw new DOMException(DOMException.NAMESPACE_ERR, 
  +				       "DOM003 Namespace error");
  +            }
  +        }
           else {
               prefix = qualifiedName.substring(0, index); 
               localName = qualifiedName.substring(index+1);
  -        }
           
  -	if ((prefix != null &&
  -	     (namespaceURI == null || namespaceURI.equals("") ||
  -	      (prefix.equals("xml") &&
  -	       !namespaceURI.equals("http://www.w3.org/XML/1998/namespace"))
  -	      ||
  -	      (prefix.equals("xmlns") &&
  -	       !namespaceURI.equals("http://www.w3.org/2000/xmlns/"))))
  -	     || (qualifiedName.equals("xmlns") &&
  -		 (namespaceURI == null ||
  -		  !namespaceURI.equals("http://www.w3.org/2000/xmlns/")))) {
  -
  -	    throw new DOMException(DOMException.NAMESPACE_ERR, 
  -				       "DOM003 Namespace error");
  -	}
  +            if (ownerDocument.errorChecking) {
  +                if (namespaceURI == null
  +                    || (localName.length() == 0)
  +                    || (localName.indexOf(':') >= 0)) {
  +                    throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                           "DOM003 Namespace error");
  +                } else if (prefix.equals("xml")) {
  +                    if (!namespaceURI.equals(xmlURI)) {
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                } else if (prefix.equals("xmlns")) {
  +                    if (!namespaceURI.equals(xmlnsURI)) {
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                } else if (index == 0) {
  +                    throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                           "DOM003 Namespace error");
  +                }
  +            }
  +        }
   	this.namespaceURI = namespaceURI;
       } 
   
  @@ -200,20 +216,32 @@
           if (needsSyncData()) {
               synchronizeData();
           }
  -	if (namespaceURI == null ||
  -	    (prefix != null &&
  -	     ((prefix.equals("xmlns") &&
  -	       !namespaceURI.equals("http://www.w3.org/2000/xmlns/"))
  -	      ||
  -	      (prefix.equals("xml") &&
  -	       !namespaceURI.equals("http://www.w3.org/XML/1998/namespace")))))
  -	{
  -    	    throw new DOMException(DOMException.NAMESPACE_ERR, 
  -				       "DOM003 Namespace error");
  -    	}
  -	if (ownerDocument.errorChecking && !DocumentImpl.isXMLName(prefix)) {
  -    	    throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +	if (ownerDocument().errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +            if (!DocumentImpl.isXMLName(prefix)) {
  +                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
       	                               "DOM002 Illegal character");
  +            }
  +            if (namespaceURI == null) {
  +                throw new DOMException(DOMException.NAMESPACE_ERR, 
  +				       "DOM003 Namespace error");
  +            } else if (prefix != null) {
  +                if (prefix.equals("xmlns")) {
  +                    if (!namespaceURI.equals(xmlnsURI)){
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                } else if (prefix.equals("xml")) {
  +                    if (!namespaceURI.equals(xmlURI)) {
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                }
  +            }
           }
           // update node name with new qualifiedName
   	name = prefix + ":" + localName;
  
  
  
  1.1.2.2   +80 -122   xml-xerces/java/src/org/apache/xerces/dom/AttributeMap.java
  
  Index: AttributeMap.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttributeMap.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AttributeMap.java	2000/12/12 19:07:35	1.1.2.1
  +++ AttributeMap.java	2001/02/14 18:29:13	1.1.2.2
  @@ -78,6 +78,8 @@
    */
   public class AttributeMap extends NamedNodeMapImpl {
   
  +    final static boolean DEBUG = false;
  +
       //
       // Constructors
       //
  @@ -115,6 +117,10 @@
               throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
                                          "DOM005 Wrong document");
           }
  +        if (arg.getNodeType() != arg.ATTRIBUTE_NODE) {
  +            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                   "DOM006 Hierarchy request error");
  +        }
   
           NodeImpl argn = (NodeImpl)arg;
   
  @@ -154,8 +160,14 @@
                              MutationEvent.ADDITION : MutationEvent.MODIFICATION
                   );
           }
  -    	return previous;
   
  +        // If the new attribute is not normalized,
  +        // the owning element is inherently not normalized.
  +        if (!argn.isNormalized()) {
  +            ownerNode.isNormalized(false);
  +        }
  +        return previous;
  +
       } // setNamedItem(Node):Node
   
       /**
  @@ -179,6 +191,10 @@
                                          "DOM005 Wrong document");
           }
   
  +        if (arg.getNodeType() != arg.ATTRIBUTE_NODE) {
  +            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                   "DOM006 Hierarchy request error");
  +        }
           NodeImpl argn = (NodeImpl)arg;
       	if (argn.isOwned()) {
               throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
  @@ -228,9 +244,15 @@
                              MutationEvent.ADDITION : MutationEvent.MODIFICATION
                   );
           }
  -    	return previous;
   
  -    } // setNamedItem(Node):Node
  +        // If the new attribute is not normalized,
  +        // the owning element is inherently not normalized.
  +        if (!argn.isNormalized()) {
  +            ownerNode.isNormalized(false);
  +        }
  +        return previous;
  +
  +    } // setNamedItemNS(Node):Node
      
       /**
        * Removes an attribute specified by name.
  @@ -492,134 +514,70 @@
       	return newmap;
       } // cloneMap():AttributeMap
   
  +    /**
  +     * Override parent's method to set the ownerNode correctly
  +     */
  +    protected void cloneContent(NamedNodeMapImpl srcmap) {
  +    	if (srcmap.nodes != null) {
  +            if (nodes == null) {
  +                nodes = new Vector(srcmap.nodes.size());
  +            }
  +            else {
  +                nodes.setSize(srcmap.nodes.size());
  +            }
  +            for (int i = 0; i < srcmap.nodes.size(); ++i) {
  +                NodeImpl n = (NodeImpl) srcmap.nodes.elementAt(i);
  +                NodeImpl clone = (NodeImpl) n.cloneNode(true);
  +                clone.isSpecified(n.isSpecified());
  +                nodes.insertElementAt(clone, i);
  +                clone.ownerNode = ownerNode;
  +                clone.isOwned(true);
  +            }
  +        }
  +    } // cloneContent():AttributeMap
   
  -    //
  -    // Protected methods
  -    //
   
       /**
  -     * Subroutine: If this NamedNodeMap is backed by a "defaults" map (eg,
  -     * if it's being used for Attributes of an XML file validated against
  -     * a DTD), we need to deal with the risk that those defaults might
  -     * have changed. Entries may have been added, changed, or removed, and
  -     * if so we need to update our version of that information
  -     * <P>
  -     * Luckily, this currently applies _only_ to Attributes, which have a
  -     * "specified" flag that allows us to distinguish which we set manually
  -     * versus which were defaults... assuming that the defaults list is being
  -     * maintained properly, of course.
  -     * <P>
  -     * Also luckily, The NameNodeMaps are maintained as 
  -     * sorted lists. This should keep the cost of convolving the two lists
  -     * managable... not wonderful, but at least more like 2N than N**2..
  -     * <P>
  -     * Finally, to avoid doing the convolution except when there are actually
  -     * changes to be absorbed, I've made the Map aware of whether or not
  -     * its defaults Map has changed. This is not 110% reliable, but it should
  -     * work under normal circumstances, especially since the DTD is usually
  -     * relatively static information.
  -     * <P>
  -     * Note: This is NON-DOM implementation, though used to support behavior
  -     * that the DOM requires.
  -     */
  -
  -/** COMMENTED OUT!!!!!!! ********
  -   Doing this dynamically is a killer, since editing the DTD isn't even
  -   supported this is commented out at least for now. In the long run it seems
  -   better to update the document on user's demand after the DTD has been
  -   changed rather than doing this anyway.
  -
  -    protected void reconcileDefaults() {
  +     * Get this AttributeMap in sync with the given "defaults" map.
  +     * @param defaults The default attributes map to sync with.
  +     */
  +    protected void reconcileDefaults(NamedNodeMapImpl defaults) {
           
  -        if (DEBUG) System.out.println("reconcileDefaults:");
  -    	if (defaults != null && changed()) {
  -
  -    		int n = 0;
  -            int d = 0;
  -            int nsize = (nodes != null) ? nodes.size() : 0;
  +        // remove any existing default
  +        int nsize = (nodes != null) ? nodes.size() : 0;
  +        for (int i = nsize - 1; i >= 0; i--) {
  +            AttrImpl attr = (AttrImpl) nodes.elementAt(i);
  +            if (!attr.isSpecified()) {
  +                // remove owning element
  +                attr.ownerNode = ownerNode.ownerDocument();
  +                attr.isOwned(false);
  +                // make sure it won't be mistaken in case it's reused
  +                attr.isSpecified(true);
  +                nodes.removeElementAt(i);
  +            }
  +        }
  +        // add the new defaults
  +    	if (defaults == null) {
  +            return;
  +        }
  +        if (nodes == null || nodes.size() == 0) {
  +            cloneContent(defaults);
  +        }
  +        else {
               int dsize = defaults.nodes.size();
  -
  -    		AttrImpl nnode = (nsize == 0) ? null : (AttrImpl) nodes.elementAt(0);
  -    		AttrImpl dnode = (dsize == 0) ? null : (AttrImpl) defaults.nodes.elementAt(0);
  -
  -    		while (n < nsize && d < dsize) {
  -    			nnode = (AttrImpl) nodes.elementAt(n);
  -    			dnode = (AttrImpl) defaults.nodes.elementAt(d);
  -    			if (DEBUG) {
  -    			System.out.println("\n\nnnode="+nnode.getNodeName());
  -    			System.out.println("dnode="+dnode.getNodeName());
  -    			}
  -    			
  -    			
  -    			int test = nnode.getNodeName().compareTo(dnode.getNodeName());
  -
  -                //REVIST: EACH CONDITION - HOW IT RESPONDS TO DUPLICATE KEYS!
  -    			// Same name and a default -- make sure same value
  -    			if (test == 0) {
  -    			    if (!nnode.getSpecified()) {
  -    			        if (DEBUG) System.out.println("reconcile (test==0, specified = false): clone default");
  -                        NodeImpl clone = (NodeImpl)dnode.cloneNode(true);
  -                        clone.ownerNode = ownerNode;
  -                        clone.isOwned(true);
  -    				    nodes.setElementAt(clone, n);
  -    				    // Advance over both, since names in sync
  -    				    ++n;
  -    				    ++d;
  -    			    }
  -    			    else { //REVIST: if same name, but specified, simply increment over it.
  -    			        if (DEBUG)
  -                                    System.out.println("reconcile (test==0, specified=true): just increment");
  -    				    ++n;
  -    				    ++d;
  -    			    }
  -    			}
  -
  -    			// Different name, new default in table; add it
  -    			else if (test > 0) {
  -    			    if (DEBUG) System.out.println("reconcile (test>0): insert new default");
  -                    NodeImpl clone = (NodeImpl)dnode.cloneNode(true);
  -                    clone.ownerNode = ownerNode;
  -                    clone.isOwned(true);
  -    				nodes.insertElementAt(clone, n);
  -    				// Now in sync, so advance over both
  -    				++n;
  -    				++d;
  -    			}
  -
  -    			// Different name, old default here; remove it.
  -    			else if (!nnode.getSpecified()) {
  -    			    if (DEBUG) System.out.println("reconcile(!specified): remove old default:"
  -    			    +nnode.getNodeName());
  -                    // NOTE: We don't need to null out the parent
  -                    //       because this is a node that we're
  -                    //       throwing away (not returning). -Ac
  -                    // REVISIT: [Q] Should we null it out anyway? -Ac
  -    				nodes.removeElementAt(n);
  -    				// n didn't advance but represents a different element
  -    			}
  -
  -    			// Different name, specified; accept it
  -                else {
  -    			    if (DEBUG) System.out.println("reconcile: Different name else accept it.");
  -    				++n;
  -                }
  -        	}
  -
  -    		// If we ran out of local before default, pick up defaults
  -            if (d < dsize) {
  -                if (nodes == null) nodes = new Vector();
  -                while (d < dsize) {
  -                    dnode = (AttrImpl)defaults.nodes.elementAt(d++);
  -                    NodeImpl clone = (NodeImpl)dnode.cloneNode(true);
  +            for (int n = 0; n < dsize; n++) {
  +                AttrImpl d = (AttrImpl) defaults.nodes.elementAt(n);
  +                int i = findNamePoint(d.getNodeName(), 0);
  +                if (i < 0) {
  +                    NodeImpl clone = (NodeImpl) d.cloneNode(true);
                       clone.ownerNode = ownerNode;
                       clone.isOwned(true);
  -    			    if (DEBUG) System.out.println("reconcile: adding"+clone);
  -                    nodes.addElement(clone);
  +                    clone.isSpecified(false);
  +                    nodes.setElementAt(clone, i);
                   }
               }
  -            changed(false);
  -    	}
  +        }
  +
       } // reconcileDefaults()
  -**/
   
   } // class AttributeMap
  
  
  
  1.29.2.3  +300 -207  xml-xerces/java/src/org/apache/xerces/dom/DocumentImpl.java
  
  Index: DocumentImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DocumentImpl.java,v
  retrieving revision 1.29.2.2
  retrieving revision 1.29.2.3
  diff -u -r1.29.2.2 -r1.29.2.3
  --- DocumentImpl.java	2000/12/12 19:07:36	1.29.2.2
  +++ DocumentImpl.java	2001/02/14 18:29:14	1.29.2.3
  @@ -67,7 +67,9 @@
   import org.w3c.dom.ranges.*;
   import org.w3c.dom.events.*;
   import org.apache.xerces.dom.events.*;
  +import org.apache.xerces.util.XMLChar;
   
  +
   /**
    * The Document interface represents the entire HTML or XML document.
    * Conceptually, it is the root of the document tree, and provides the
  @@ -91,6 +93,10 @@
    * <b>Note:</b> When any node in the document is serialized, the
    * entire document is serialized along with it.
    *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
  + * @author Ralf Pfeiffer, IBM
    * @version
    * @since  PR-DOM-Level-1-19980818.
    */
  @@ -117,6 +123,17 @@
       /** Document element. */
       protected ElementImpl docElement;
   
  +    
  +    /**Experimental DOM Level 3 feature: Document encoding */
  +    protected String encoding;
  +
  +    /**Experimental DOM Level 3 feature: Document version */
  +    protected String version;
  +
  +    /**Experimental DOM Level 3 feature: Document standalone */
  +    protected boolean standalone;
  +
  +
       /** Identifiers. */
       protected Hashtable identifiers;
   
  @@ -290,22 +307,27 @@
           // then the children by importing them
   
           if (needsSyncChildren()) {
  -                synchronizeChildren();
  -             }
  +            synchronizeChildren();
  +        }
   
           if (deep) {
  -            for (ChildNode n = firstChild; n != null; n = n.nextSibling) {
  -                newdoc.appendChild(newdoc.importNode(n, true));
  +            Hashtable reversedIdentifiers = null;
  +
  +            if (identifiers != null) {
  +                // Build a reverse mapping from element to identifier.
  +                reversedIdentifiers = new Hashtable();
  +                Enumeration elementIds = identifiers.keys();
  +                while (elementIds.hasMoreElements()) {
  +                    Object elementId = elementIds.nextElement();
  +                    reversedIdentifiers.put(identifiers.get(elementId), elementId);
  +                }
               }
  -        }
   
  -        // REVISIT: What to do about identifiers that are cloned? -Ac
  -        //newdoc.identifiers = (Hashtable)identifiers.clone(); // WRONG!
  -        newdoc.identifiers = null;
  -        newdoc.iterators = null;
  -        newdoc.ranges = null;
  -        newdoc.userData = null;
  -        newdoc.eventListeners = null;
  +            // Copy children into new document.
  +            for (ChildNode kid = firstChild; kid != null; kid = kid.nextSibling) {
  +                newdoc.appendChild(newdoc.importNode(kid, true, reversedIdentifiers));
  +            }
  +        }
   
           // experimental
           newdoc.allowGrammarAccess = allowGrammarAccess;
  @@ -479,10 +501,9 @@
           throws DOMException {
   
       	if (errorChecking && !isXMLName(tagName)) {
  -    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  -    		                           "DOM002 Illegal character");
  +            throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +                                   "DOM002 Illegal character");
           }
  -
       	return new ElementImpl(this, tagName);
   
       } // createElement(String):Element
  @@ -501,10 +522,9 @@
           throws DOMException {
   
       	if (errorChecking && !isXMLName(name)) {
  -    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  -    		                           "DOM002 Illegal character");
  +            throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +                                   "DOM002 Illegal character");
           }
  -
       	return new EntityReferenceImpl(this, name);
   
       } // createEntityReference(String):EntityReference
  @@ -529,7 +549,6 @@
       		throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
       		                           "DOM002 Illegal character");
           }
  -
       	return new ProcessingInstructionImpl(this, target, data);
   
       } // createProcessingInstruction(String,String):ProcessingInstruction
  @@ -555,9 +574,35 @@
           if (needsSyncChildren()) {
               synchronizeChildren();
           }
  -	    return docType;
  +        return docType;
  +    }
  +
  +
  +   /**
  +    * DOM Level 3 WD - Experimental.      
  +    * The encoding of this document (part of XML Declaration)     
  +    */
  +    public String getEncoding() {
  +	return encoding;
  +    }
  +
  +    /**
  +      * DOM Level 3 WD - Experimental.
  +      * The version of this document (part of XML Declaration)     
  +      */
  +    public String getVersion() {
  +	return version;
  +    }
  +
  +     /**
  +      * DOM Level 3 WD - Experimental.    
  +      * standalone that specifies whether this document is standalone (part of XML Declaration)     
  +      */
  +    public boolean getStandalone() {
  +        return standalone;
       }
   
  +
       /**
        * Convenience method, allowing direct access to the child node
   	 * which is considered the root of the actual document content. For
  @@ -571,7 +616,7 @@
           if (needsSyncChildren()) {
               synchronizeChildren();
           }
  -	    return docElement;
  +        return docElement;
       }
   
       /**
  @@ -584,7 +629,7 @@
   	 * @see DeepNodeListImpl
   	 */
       public NodeList getElementsByTagName(String tagname) {
  -	    return new DeepNodeListImpl(this,tagname);
  +        return new DeepNodeListImpl(this,tagname);
       }
   
       /**
  @@ -623,11 +668,41 @@
        * <li>Checks related to DOM events
        * </ul>
        */
  +    
       public void setErrorChecking(boolean check) {
           errorChecking = check;
       }
   
  +    
       /**
  +      * DOM Level 3 WD - Experimental.
  +      * An attribute specifying, as part of the XML declaration, 
  +      * the encoding of this document. This is null when unspecified.
  +      */
  +    public void setEncoding(String value) {
  +        encoding = value;
  +    }
  +
  +    /**
  +      * DOM Level 3 WD - Experimental.
  +      * version - An attribute specifying, as part of the XML declaration, 
  +      * the version number of this document. This is null when unspecified
  +      */
  +    public void setVersion(String value) {
  +       version = value;    
  +    }
  +
  +    /**
  +      * DOM Level 3 WD - Experimental.
  +      * standalone - An attribute specifying, as part of the XML declaration, 
  +      * whether this document is standalone
  +      */
  +    public void setStandalone(boolean value) {
  +        standalone = value;
  +    } 
  +    
  +
  +    /**
        * Returns true if the DOM implementation performs error checking.
        */
       public boolean getErrorChecking() {
  @@ -668,8 +743,8 @@
           throws DOMException {
   
       	if (errorChecking && !isXMLName(qualifiedName)) {
  -    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  -    		                           "DOM002 Illegal character");
  +            throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +                                   "DOM002 Illegal character");
           }
       	return new DocumentTypeImpl(this, qualifiedName, publicID, systemID);
   
  @@ -690,14 +765,10 @@
       public Entity createEntity(String name)
           throws DOMException {
   
  -        // REVISIT: Should we be checking XML name chars?
  -        /***
       	if (errorChecking && !isXMLName(name)) {
       		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
       		                           "DOM002 Illegal character");
           }
  -        /***/
  -
       	return new EntityImpl(this, name);
   
       } // createEntity(String):Entity
  @@ -717,14 +788,10 @@
       public Notation createNotation(String name)
           throws DOMException {
   
  -        // REVISIT: Should we be checking XML name chars?
  -        /***
       	if (errorChecking && !isXMLName(name)) {
       		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
       		                           "DOM002 Illegal character");
           }
  -        /***/
  -
       	return new NotationImpl(this, name);
   
       } // createNotation(String):Notation
  @@ -736,14 +803,10 @@
       public ElementDefinitionImpl createElementDefinition(String name)
           throws DOMException {
   
  -        // REVISIT: Should we be checking XML name chars?
  -        /***
       	if (errorChecking && !isXMLName(name)) {
       		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
       		                           "DOM002 Illegal character");
           }
  -        /***/
  -
           return new ElementDefinitionImpl(this, name);
   
       } // createElementDefinition(String):ElementDefinitionImpl
  @@ -751,40 +814,46 @@
       // other non-DOM methods
   
       /**
  -     * Copies data from the source node. Unlike cloneNode, this
  -     * _can_ copy data from another document. If the source document is also
  -     * based on org.apache.xerces.dom, we will attempt to preserve the domimpl-
  -     * internal data by doing a clone-and-reparent. If not, we will use
  -     * the source's public methods, and this document's Factory methods,
  -     * to copy data defined by the DOM interfaces.
  -     *
  +     * Copies a node from another document to this document. The new nodes are
  +     * created using this document's factory methods and are populated with the
  +     * data from the source's accessor methods defined by the DOM interfaces.
        * Its behavior is otherwise similar to that of cloneNode.
  -     *
  -     * Attempting to import a Document into another Document is meaningless --
  -     * a new Document would not improve matters much, and a DocumentFragment
  -     * couldn't carry the DocumentType child (if any). Best thing we can do
  -     * is throw a HIERARCHY_REQUEST_ERR.
  -     *
  -     * ????? Should we push some of this down to copy-ctors, so
  -     * subclassed DOMs have the option of special-casing each other
  -     * (as we do for ourself)?
  +     * <p>
  +     * According to the DOM specifications, document nodes cannot be imported
  +     * and a NOT_SUPPORTED_ERR exception is thrown if attempted.
        */
       public Node importNode(Node source, boolean deep)
  -        throws DOMException {
  +	throws DOMException {
  +        return importNode(source, deep, null);
  +    } // importNode(Node,boolean):Node
   
  -    	Node newnode=null;
  +    /**
  +     * Overloaded implementation of DOM's importNode method. This method
  +     * provides the core functionality for the public importNode and cloneNode
  +     * methods.
  +     *
  +     * The reversedIdentifiers parameter is provided for cloneNode to
  +     * preserve the document's identifiers. The Hashtable has Elements as the
  +     * keys and their identifiers as the values. When an element is being
  +     * imported, a check is done for an associated identifier. If one exists,
  +     * the identifier is registered with the new, imported element. If
  +     * reversedIdentifiers is null, the parameter is not applied.
  +     */
  +    private Node importNode(Node source, boolean deep, Hashtable reversedIdentifiers)
  +	throws DOMException {
  +        Node newnode=null;
   
  -    	// Sigh. This doesn't work; too many nodes have private data that
  -    	// would have to be manually tweaked. May be able to add local
  -    	// shortcuts to each nodetype. Consider ?????
  -    	// if(source instanceof NodeImpl &&
  -    	//	!(source instanceof DocumentImpl))
  -    	// {
  -    	//  // Can't clone DocumentImpl since it invokes us...
  -    	//	newnode=(NodeImpl)source.cloneNode(false);
  -    	//	newnode.ownerDocument=this;
  -    	//}
  -    	//else
  +        // Sigh. This doesn't work; too many nodes have private data that
  +        // would have to be manually tweaked. May be able to add local
  +        // shortcuts to each nodetype. Consider ?????
  +        // if(source instanceof NodeImpl &&
  +        //  !(source instanceof DocumentImpl))
  +        // {
  +        //  // Can't clone DocumentImpl since it invokes us...
  +        //  newnode=(NodeImpl)source.cloneNode(false);
  +        //  newnode.ownerDocument=this;
  +        // }
  +        // else
   
           DOMImplementation  domImplementation     = 
                     source.getOwnerDocument().getImplementation(); // get source implementation
  @@ -794,42 +863,50 @@
   
           int type                                 = source.getNodeType();
   
  -    	switch (type) {
  -    		
  +        switch (type) {
               case ELEMENT_NODE: {
  -		Element newelement;
  -               
  -                if( domLevel20 == true ){
  -                    if( source.getLocalName() == null ){
  -                         newelement = createElement(source.getNodeName());
  -                    } else {
  -                         newelement = createElementNS(source.getNamespaceURI(),
  -						 source.getNodeName());
  -                    }
  -                } else {
  -                    newelement = createElement( source.getNodeName() );
  +                Element newElement;
   
  +                // Create element according to namespace support/qualification.
  +                if(domLevel20 == false || source.getLocalName() == null)
  +                    newElement = createElement(source.getNodeName());
  +                else
  +                    newElement = createElementNS(source.getNamespaceURI(), source.getNodeName());
  +
  +                // Copy element's attributes, if any.
  +                NamedNodeMap sourceAttrs = source.getAttributes();
  +                if (sourceAttrs != null) {
  +                    int length = sourceAttrs.getLength();
  +                    for (int index = 0; index < length; index++) {
  +                        Attr attr = (Attr)sourceAttrs.item(index);
  +
  +                        // Copy the attribute only if it is not a default.
  +                        if (attr.getSpecified()) {
  +                            Attr newAttr = (Attr)importNode(attr, true, reversedIdentifiers);
  +
  +                            // Attach attribute according to namespace support/qualification.
  +                            if(domLevel20 == false || attr.getLocalName() == null)
  +                                newElement.setAttributeNode(newAttr);
  +                            else
  +                                newElement.setAttributeNodeNS(newAttr);
  +                        }
  +                    }
                   }
   
  -		NamedNodeMap srcattr = source.getAttributes();
  -		if (srcattr != null) {
  -                    for(int i = 0; i < srcattr.getLength(); i++) {
  -                        Attr attr = (Attr) srcattr.item(i);
  -                        if (attr.getSpecified()) { // not a default attribute
  -                            Attr nattr = (Attr) importNode(attr, true);
  -                            if( domLevel20 == true ) {
  -                                 if (attr.getLocalName() == null)
  -                                     newelement.setAttributeNode(nattr);
  -                                 else
  -                                     newelement.setAttributeNodeNS(nattr);
  -                            } else {
  -                            newelement.setAttributeNode(nattr);
  -                            }
  -                        }
  +                // Register element identifier.
  +                if (reversedIdentifiers != null) {
  +                    // Does element have an associated identifier?
  +                    Object elementId = reversedIdentifiers.get(source);
  +                    if (elementId != null) {
  +                        if (identifiers == null)
  +                            identifiers = new Hashtable();
  +
  +                        identifiers.put(elementId, newElement);
                       }
                   }
  -		newnode = newelement;
  -		break;
  +
  +                newnode = newElement;
  +                break;
               }
   
               case ATTRIBUTE_NODE: {
  @@ -839,13 +916,29 @@
            	        newnode = createAttribute(source.getNodeName());
            	    } else {
             	        newnode = createAttributeNS(source.getNamespaceURI(),
  -          					source.getNodeName());
  +                                                    source.getNodeName());
            	    }
  -               } else {
  -                   newnode = createAttribute(source.getNodeName());
  -               }
  -                deep = true;
  -		// Kids carry value
  +                }
  +                else {
  +                    newnode = createAttribute(source.getNodeName());
  +                }
  +                // if source is an AttrImpl from this very same implementation
  +                // avoid creating the child nodes if possible
  +                if (source instanceof AttrImpl) {
  +                    AttrImpl attr = (AttrImpl) source;
  +                    if (attr.hasStringValue()) {
  +                        AttrImpl newattr = (AttrImpl) newnode;
  +                        newattr.setValue(attr.getValue());
  +                        deep = false;
  +                    }
  +                    else {
  +                        deep = true;
  +                    }
  +                }
  +                else {
  +                    // Kids carry value
  +                    deep = true;
  +                }
   		break;
               }
   
  @@ -890,6 +983,8 @@
   		break;
               }
   
  +            // REVISIT: The DOM specifications say that DocumentType nodes cannot be
  +            // imported. Is this OK?
       	    case DOCUMENT_TYPE_NODE: {
   		DocumentType srcdoctype = (DocumentType)source;
   		DocumentTypeImpl newdoctype = (DocumentTypeImpl)
  @@ -901,14 +996,14 @@
   		NamedNodeMap tmap = newdoctype.getEntities();
   		if(smap != null) {
   		    for(int i = 0; i < smap.getLength(); i++) {
  -			tmap.setNamedItem(importNode(smap.item(i), true));
  +			tmap.setNamedItem(importNode(smap.item(i), true, reversedIdentifiers));
                       }
                   }
   		smap = srcdoctype.getNotations();
   		tmap = newdoctype.getNotations();
   		if (smap != null) {
   		    for(int i = 0; i < smap.getLength(); i++) {
  -			tmap.setNamedItem(importNode(smap.item(i), true));
  +			tmap.setNamedItem(importNode(smap.item(i), true, reversedIdentifiers));
                       }
                   }
   		// NOTE: At this time, the DOM definition of DocumentType
  @@ -938,10 +1033,11 @@
   		break;
               }
   
  -    	    case DOCUMENT_NODE : // Document can't be child of Document
  -    	    default: {		// Unknown node type
  -		throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
  -					   "DOM006 Hierarchy request error");
  +            case DOCUMENT_NODE : // Can't import document nodes
  +            default: {           // Unknown node type
  +                throw new DOMException(
  +                                       DOMException.NOT_SUPPORTED_ERR,
  +                                       "Node type being imported is not supported");
               }
           }
   
  @@ -950,7 +1046,7 @@
   	    for (Node srckid = source.getFirstChild();
                    srckid != null;
                    srckid = srckid.getNextSibling()) {
  -		newnode.appendChild(importNode(srckid, true));
  +		newnode.appendChild(importNode(srckid, true, reversedIdentifiers));
   	    }
           }
           if (newnode.getNodeType() == Node.ENTITY_REFERENCE_NODE
  @@ -959,28 +1055,92 @@
           }
       	return newnode;
   
  -    } // importNode(Node,boolean):Node
  +    } // importNode(Node,boolean,Hashtable):Node
   
       /**
  -     * NON-DOM:
  +     * DOM Level 3 Prototype:
        * Change the node's ownerDocument, and its subtree, to this Document
        *
  -     * @param source The node to move in to this document.
  -     * @exception NOT_SUPPORTED_ERR DOMException, raised if the implementation
  -     * cannot handle the request, such as when the source node comes from a
  -     * different DOMImplementation
  +     * @param source The node to adopt.
        * @see DocumentImpl.importNode
        **/
  -    public void adoptNode(Node source) {
  -	if (!(source instanceof NodeImpl)) {
  -	    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
  -		      "cannot move a node in from another DOM implementation");
  -	}
  -	Node parent = source.getParentNode();
  -	if (parent != null) {
  -	    parent.removeChild(source);
  -	}
  -	((NodeImpl)source).setOwnerDocument(this);
  +    public Node adoptNode(Node source) {
  +        NodeImpl node;
  +        try {
  +            node = (NodeImpl) source;
  +        } catch (ClassCastException e) {
  +            // source node comes from a different DOMImplementation
  +            return null;
  +        }
  +        switch (node.getNodeType()) {
  +            case ATTRIBUTE_NODE: {
  +                AttrImpl attr = (AttrImpl) node;
  +                // remove node from wherever it is
  +                attr.getOwnerElement().removeAttributeNode(attr);
  +                // mark it as specified
  +                attr.isSpecified(true);
  +                // change ownership
  +                attr.setOwnerDocument(this);
  +                break;
  +            }
  +            case DOCUMENT_NODE:
  +            case DOCUMENT_TYPE_NODE: {
  +                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
  +                                       "cannot adopt this type of node.");
  +            }
  +            case ENTITY_REFERENCE_NODE: {
  +                // remove node from wherever it is
  +                Node parent = node.getParentNode();
  +                if (parent != null) {
  +                    parent.removeChild(source);
  +                }
  +                // discard its replacement value
  +                Node child;
  +                while ((child = node.getFirstChild()) != null) {
  +                    node.removeChild(child);
  +                }
  +                // change ownership
  +                node.setOwnerDocument(this);
  +                // set its new replacement value if any
  +                if (docType == null) {
  +                    break;
  +                }
  +                NamedNodeMap entities = docType.getEntities();
  +                Node entityNode = entities.getNamedItem(node.getNodeName());
  +                if (entityNode == null) {
  +                    break;
  +                }
  +                EntityImpl entity = (EntityImpl) entityNode;
  +                for (child = entityNode.getFirstChild();
  +                     child != null; child = child.getNextSibling()) {
  +                    Node childClone = child.cloneNode(true);
  +                    node.appendChild(childClone);
  +                }
  +                break;
  +            }
  +            case ELEMENT_NODE: {
  +                // remove node from wherever it is
  +                Node parent = node.getParentNode();
  +                if (parent != null) {
  +                    parent.removeChild(source);
  +                }
  +                // change ownership
  +                node.setOwnerDocument(this);
  +                // reconcile default attributes
  +                ((ElementImpl)node).reconcileDefaultAttributes();
  +                break;
  +            }
  +            default: {
  +                // remove node from wherever it is
  +                Node parent = node.getParentNode();
  +                if (parent != null) {
  +                    parent.removeChild(source);
  +                }
  +                // change ownership
  +                node.setOwnerDocument(this);
  +            }
  +        }
  +        return node;
       }
   
       // identifier maintenence
  @@ -1113,6 +1273,10 @@
       public Element createElementNS(String namespaceURI, String qualifiedName)
           throws DOMException
       {
  +    	if (errorChecking && !isXMLName(qualifiedName)) {
  +            throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +                                   "DOM002 Illegal character");
  +        }
           return new ElementNSImpl( this, namespaceURI, qualifiedName);
       }
   
  @@ -1137,6 +1301,10 @@
       public Attr createAttributeNS(String namespaceURI, String qualifiedName)
           throws DOMException
       {
  +    	if (errorChecking && !isXMLName(qualifiedName)) {
  +            throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +                                   "DOM002 Illegal character");
  +        }
           return new AttrNSImpl( this, namespaceURI, qualifiedName);
       }
   
  @@ -1157,7 +1325,7 @@
        */
       public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
       {
  -	    return new DeepNodeListImpl(this, namespaceURI, localName);
  +        return new DeepNodeListImpl(this, namespaceURI, localName);
       }
   
       //
  @@ -1244,17 +1412,13 @@
                                          NodeFilter filter,
                                          boolean entityReferenceExpansion)
       {
  -    	if( root==null) {
  -    		throw new DOMException(
  +    	if (root==null) {
  +            throw new DOMException(
       			DOMException.NOT_SUPPORTED_ERR, 
   			"DOM007 Not supported");
           }
  -        
  -        TreeWalker treeWalker = new TreeWalkerImpl(root,
  -                                                   whatToShow,
  -                                                   filter,
  -                                                   entityReferenceExpansion);
  -        return treeWalker;
  +        return new TreeWalkerImpl(root, whatToShow, filter,
  +                                  entityReferenceExpansion);
       }
   
       //
  @@ -1440,86 +1604,15 @@
   
       /**
        * Check the string against XML's definition of acceptable names for
  -     * elements and attributes and so on. From the XML spec:
  -     * <p>
  -     * [Definition:] A Name is a token beginning with a letter or one of a
  -     * few punctuation characters, and continuing with letters, digits,
  -     * hyphens,underscores, colons, or full stops, together known as name
  -     * characters.
  -     * <p>
  -     * Unfortunately, that spec goes on to say that after the first character,
  -     * names may use "combining characters" and "extender characters",
  -     * which are explicitly listed rather than defined in terms of Java's
  -     * Unicode character types... and which in fact can't be expressed solely
  -     * in terms of those types.
  -     * <p>
  -     * I've empirically derived some tests which are partly based on the
  -     * Java Unicode space (which simplifies them considerably), but they
  -     * still wind up having to be further qualified. This may not remain
  -     * valid if future extensions of Java and/or Unicode introduce other
  -     * characters having these type numbers.
  -     * <p>
  -     * Suggestions for alternative implementations would be welcome.
  +     * elements and attributes and so on using the XMLCharacterProperties
  +     * utility class
        */
       public static boolean isXMLName(String s) {
   
  -        // REVISIT: Use the parser's character checking code. -Ac
  -
           if (s == null) {
               return false;
           }
  -
  -    	char [] ca=new char[s.length()];
  -    	s.getChars(0,s.length(),ca,0);
  -
  -    	// First character must be letter, underscore, or colon.
  -    	if (!Character.isLetter(ca[0]) && "_:".indexOf((int)ca[0]) == -1) {
  -    		return false;
  -            }
  -
  -    	// Remaining characters must be letter, digit, underscore,
  -    	// colon, period, dash, an XML "Combining Character", or an
  -    	// XML "Extender Character".
  -    	for (int i = 1; i < s.length(); ++i) {
  -
  -    		char c = ca[i];
  -    		int ctype = Character.getType(c);
  -
  -    		if (!Character.isLetterOrDigit(c) &&
  -                (".-_:".indexOf(c) == -1) &&
  -    		
  -                // Right type
  -    		    (!(ctype >= 6 && ctype <= 8 &&	
  -                      // Bad ranges, combined from the three types:
  -    				  !((c >= 0x06dd && c <= 0x06de) ||
  -      				  	(c >= 0x20dd && c <= 0x20e0) ||
  -      				   	 c >= 0x309b
  -    				   	)
  -    				  )
  -    			    ) &&
  -    		
  -    			  // XML Extender chars are all type 4 (uppercase) except
  -    			  // for two which are type 24. (titlecase modifier)
  -
  -                  // Right type
  -    		      (!(ctype == 4 &&
  -                        // Bad ranges
  -    					!((c >= 0x02d0 && c <= 0x0559) ||
  -    				      (c >= 0x06e5 && c <= 0x06e6) ||
  -    					  (c >= 0x309b && c <= 0x309c)
  -    					 )
  -    				|| c == 0x00b7 // Type 24
  -    				|| c == 0x0387 // Type 24
  -    				))
  -                  ) {
  -    		
  -    		    return false;
  -            }
  -    		
  -    	}
  -
  -    	// All characters passed the tests.
  -    	return true;
  +        return XMLChar.isValidName(s);
       	
       } // isXMLName(String):boolean
   
  
  
  
  1.13.2.3  +6 -3      xml-xerces/java/src/org/apache/xerces/dom/DocumentTypeImpl.java
  
  Index: DocumentTypeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DocumentTypeImpl.java,v
  retrieving revision 1.13.2.2
  retrieving revision 1.13.2.3
  diff -u -r1.13.2.2 -r1.13.2.3
  --- DocumentTypeImpl.java	2000/12/12 19:07:36	1.13.2.2
  +++ DocumentTypeImpl.java	2001/02/14 18:29:15	1.13.2.3
  @@ -76,11 +76,14 @@
    * and using Element and Attribute information. Nor was the linkage
    * between Entities and Entity References nailed down solidly.
    *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
    * @version
    * @since  PR-DOM-Level-1-19980818.
    */
   public class DocumentTypeImpl 
  -    extends ChildAndParentNode
  +    extends ParentNode
       implements DocumentType {
   
       //
  @@ -315,8 +318,8 @@
       	
           if (needsSyncChildren()) {
               synchronizeChildren();
  -            }
  -        setReadOnly(readOnly, deep);
  +        }
  +        super.setReadOnly(readOnly, deep);
   
           // set read-only property
           elements.setReadOnly(readOnly, true);
  
  
  
  1.22.2.3  +70 -53    xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java
  
  Index: ElementImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java,v
  retrieving revision 1.22.2.2
  retrieving revision 1.22.2.3
  diff -u -r1.22.2.2 -r1.22.2.3
  --- ElementImpl.java	2000/12/12 19:07:36	1.22.2.2
  +++ ElementImpl.java	2001/02/14 18:29:15	1.22.2.3
  @@ -80,11 +80,15 @@
    * it, does.
    * @see ElementNSImpl
    *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
  + * @author Ralf Pfeiffer, IBM
    * @version
    * @since  PR-DOM-Level-1-19980818.
    */
   public class ElementImpl
  -    extends ChildAndParentNode
  +    extends ParentNode
       implements Element {
   
       //
  @@ -167,10 +171,6 @@
        */
       public Node cloneNode(boolean deep) {
   
  -        if (needsSyncData()) {
  -            synchronizeData();
  -        }
  -
       	ElementImpl newnode = (ElementImpl) super.cloneNode(deep);
       	// Replicate NamedNodeMap rather than sharing it.
           if (attributes != null) {
  @@ -287,9 +287,16 @@
        * normal Text or with other CDATASections.
        */
       public void normalize() {
  -    	Node kid, next;
  -    	for (kid = getFirstChild(); kid != null; kid = next) {
  -    		next = kid.getNextSibling();
  +        // No need to normalize if already normalized.
  +        if (isNormalized()) {
  +            return;
  +        }
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        ChildNode kid, next;
  +        for (kid = firstChild; kid != null; kid = next) {
  +            next = kid.nextSibling;
   
               // If kid is a text node, we need to check for one of two
               // conditions:
  @@ -313,9 +320,9 @@
                   }
               }
   
  -    		// Otherwise it might be an Element, which is handled recursively
  -    		else if (kid.getNodeType() ==  Node.ELEMENT_NODE) {
  -                ((Element)kid).normalize();
  +            // Otherwise it might be an Element, which is handled recursively
  +            else if (kid.getNodeType() == Node.ELEMENT_NODE) {
  +                kid.normalize();
               }
           }
   
  @@ -332,6 +339,7 @@
       	// changed() will have occurred when the removeChild() was done,
       	// so does not have to be reissued.
   
  +        isNormalized(true);
       } // normalize()
   
       /**
  @@ -351,10 +359,9 @@
        */
       public void removeAttribute(String name) {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +    	if (ownerDocument.errorChecking && isReadOnly()) {
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
       		
           if (needsSyncData()) {
  @@ -387,13 +394,11 @@
        * readonly.
        */
       public Attr removeAttributeNode(Attr oldAttr)
  -        throws DOMException
  -        {
  +        throws DOMException {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +    	if (ownerDocument.errorChecking && isReadOnly()) {
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
       		
           if (needsSyncData()) {
  @@ -430,10 +435,9 @@
        */
       public void setAttribute(String name, String value) {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +    	if (ownerDocument.errorChecking && isReadOnly()) {
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
   
           if (needsSyncData()) {
  @@ -474,20 +478,21 @@
           throws DOMException
           {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  -        }
  -    	
           if (needsSyncData()) {
               synchronizeData();
           }
   
  -    	if (ownerDocument.errorChecking
  -            && newAttr.getOwnerDocument() != ownerDocument) {
  +    	if (ownerDocument.errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +    	
  +            if (newAttr.getOwnerDocument() != ownerDocument) {
       		throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  -    		                           "DOM005 Wrong document");
  +                                       "DOM005 Wrong document");
  +            }
           }
   
           if (attributes == null) {
  @@ -573,10 +578,9 @@
        */
       public void setAttributeNS(String namespaceURI, String localName, String value) {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +    	if (ownerDocument.errorChecking && isReadOnly()) {
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
   
           if (needsSyncData()) {
  @@ -617,10 +621,9 @@
        */
       public void removeAttributeNS(String namespaceURI, String localName) {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  +    	if (ownerDocument.errorChecking && isReadOnly()) {
  +            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                   "DOM001 Modification not allowed");
           }
       		
           if (needsSyncData()) {
  @@ -688,20 +691,19 @@
           throws DOMException
           {
   
  -    	if (isReadOnly()) {
  -    		throw new DOMException(
  -    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -    			"DOM001 Modification not allowed");
  -        }
  -    	
           if (needsSyncData()) {
               synchronizeData();
           }
  -
  -    	if (ownerDocument.errorChecking
  -            && newAttr.getOwnerDocument() != ownerDocument) {
  -    		throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  -    		"DOM005 Wrong document");
  +        if (ownerDocument.errorChecking) {
  +            if (isReadOnly()) {
  +    		throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +            if (newAttr.getOwnerDocument() != ownerDocument) {
  +                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  +                                       "DOM005 Wrong document");
  +            }
           }
   
           if (attributes == null) {
  @@ -782,9 +784,16 @@
           // no need to sync in the future
           needsSyncData(false);
   
  +        // we don't want to generate any event for this so turn them off
  +        boolean orig = ownerDocument.mutationEvents;
  +        ownerDocument.mutationEvents = false;
  +
           // attributes
           setupDefaultAttributes();
   
  +        // set mutation events flag back to its original value
  +        ownerDocument.mutationEvents = orig;
  +
       } // synchronizeData()
   
       /** Setup the default attributes. */
  @@ -792,6 +801,14 @@
           NamedNodeMapImpl defaults = getDefaultAttributes();
           if (defaults != null) {
               attributes = new AttributeMap(this, defaults);
  +        }
  +    }
  +
  +    /** Reconcile default attributes. */
  +    protected void reconcileDefaultAttributes() {
  +        NamedNodeMapImpl defaults = getDefaultAttributes();
  +        if (defaults != null) {
  +            attributes.reconcileDefaults(defaults);
           }
       }
   
  
  
  
  1.11.4.3  +40 -22    xml-xerces/java/src/org/apache/xerces/dom/ElementNSImpl.java
  
  Index: ElementNSImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ElementNSImpl.java,v
  retrieving revision 1.11.4.2
  retrieving revision 1.11.4.3
  diff -u -r1.11.4.2 -r1.11.4.3
  --- ElementNSImpl.java	2000/12/12 19:07:36	1.11.4.2
  +++ ElementNSImpl.java	2001/02/14 18:29:15	1.11.4.3
  @@ -1,4 +1,4 @@
  -/* $Id: ElementNSImpl.java,v 1.11.4.2 2000/12/12 19:07:36 lehors Exp $ */
  +/* $Id: ElementNSImpl.java,v 1.11.4.3 2001/02/14 18:29:15 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -76,6 +76,7 @@
   
       /** Serialization version. */
       static final long serialVersionUID = -9142310625494392642L;
  +    static final String xmlURI = "http://www.w3.org/XML/1998/namespace";
   
       //
       // Data
  @@ -97,10 +98,6 @@
           throws DOMException
       {
       	super(ownerDocument, qualifiedName);
  -    	if (!DocumentImpl.isXMLName(qualifiedName)) {
  -    	    throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  -    	                               "DOM002 Illegal character");
  -        }
   
           int index = qualifiedName.indexOf(':');
           String prefix;
  @@ -111,16 +108,25 @@
           else {
               prefix = qualifiedName.substring(0, index); 
               localName = qualifiedName.substring(index+1);
  -        }
           
  -	if (prefix != null &&
  -	    (namespaceURI == null || namespaceURI.equals("") ||
  -	     (prefix.equals("xml") &&
  -	      !namespaceURI.equals("http://www.w3.org/XML/1998/namespace")))) {
  -
  -	    throw new DOMException(DOMException.NAMESPACE_ERR, 
  -				       "DOM003 Namespace error");
  -	}
  +            if (ownerDocument.errorChecking) {
  +                if (namespaceURI == null
  +                    || (localName.length() == 0)
  +                    || (localName.indexOf(':') >= 0)) {
  +                    throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                           "DOM003 Namespace error");
  +                }
  +                else if (prefix.equals("xml")) {
  +                    if (!namespaceURI.equals(xmlURI)) {
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                } else if (index == 0) {
  +                    throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                           "DOM003 Namespace error");
  +                }
  +            }
  +        }
   	this.namespaceURI = namespaceURI;
       }
   
  @@ -196,16 +202,28 @@
       {
           if (needsSyncData()) {
               synchronizeData();
  -        }
  -	if (namespaceURI == null ||
  -	    (prefix != null && prefix.equals("xml") &&
  -	     !namespaceURI.equals("http://www.w3.org/XML/1998/namespace"))) {
  -    	    throw new DOMException(DOMException.NAMESPACE_ERR, 
  -				       "DOM003 Namespace error");
           }
  -	if (ownerDocument.errorChecking && !DocumentImpl.isXMLName(prefix)) {
  -    	    throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
  +	if (ownerDocument().errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +            if (!DocumentImpl.isXMLName(prefix)) {
  +                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
       	                               "DOM002 Illegal character");
  +            }
  +            if (namespaceURI == null) {
  +                  throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                         "DOM003 Namespace error");
  +            } else if (prefix != null) {
  +                if (prefix.equals("xml")) {
  +                    if (!namespaceURI.equals(xmlURI)) {
  +                        throw new DOMException(DOMException.NAMESPACE_ERR, 
  +                                               "DOM003 Namespace error");
  +                    }
  +                }
  +            }
           }
           // update node name with new qualifiedName
           name = prefix + ":" + localName;
  
  
  
  1.9.2.3   +74 -4     xml-xerces/java/src/org/apache/xerces/dom/EntityImpl.java
  
  Index: EntityImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/EntityImpl.java,v
  retrieving revision 1.9.2.2
  retrieving revision 1.9.2.3
  diff -u -r1.9.2.2 -r1.9.2.3
  --- EntityImpl.java	2000/12/12 19:07:36	1.9.2.2
  +++ EntityImpl.java	2001/02/14 18:29:16	1.9.2.3
  @@ -117,6 +117,13 @@
       /** System identifier. */
       protected String systemId;
   
  +    /** Encoding */
  +    protected String encoding;
  +
  +    /** Version */
  +    protected String version;
  +
  +
       /** Notation name. */
       protected String notationName;
   
  @@ -190,6 +197,37 @@
       } // getSystemId():String
   
       /** 
  +      * DOM Level 3 WD - experimental
  +      * the version number of this entity, when it is an external parsed entity. 
  +      */
  +    public String getVersion() {
  +
  +       if (needsSyncData()) {
  +           synchronizeData();
  +       }
  +       return version;
  +
  +   } // getVersion():String
  +
  +
  +    /**
  +     * DOM Level 3 WD - experimental 
  +     * the encoding of this entity, when it is an external parsed entity. 
  +     */
  +    public String getEncoding() {
  +
  +       if (needsSyncData()) {
  +           synchronizeData();
  +       }
  +       return encoding;
  +
  +   } // getVersion():String
  +
  +
  +
  +
  +
  +    /** 
        * Unparsed entities -- which contain non-XML data -- have a
        * "notation name" which tells applications how to deal with them.
        * Parsed entities, which <em>are</em> in XML format, don't need this and
  @@ -209,7 +247,7 @@
       //
   
       /**
  -     * NON-DOM The public identifier associated with the entity. If not specified,
  +     * DOM Level 2: The public identifier associated with the entity. If not specified,
        * this will be null. */
       public void setPublicId(String id) {
           
  @@ -217,11 +255,43 @@
               synchronizeData();
           }
       	publicId = id;
  +
  +    } // setPublicId(String)
  +
  +    /**
  +     * DOM Level 3 WD - experimental 
  +     * encoding - An attribute specifying, as part of the text declaration, 
  +     * the encoding of this entity, when it is an external parsed entity. 
  +     * This is null otherwise
  +     */
  +    public void setEncoding(String value) {
  +        
  +        if (needsSyncData()) {
  +            synchronizeData();
  +        }
  +    	encoding = value;
  +
  +    } // setEncoding (String)
  +
  +
  +    /** 
  +      * DOM Level 3 WD - experimental
  +      * version - An attribute specifying, as part of the text declaration, 
  +      * the version number of this entity, when it is an external parsed entity. 
  +      * This is null otherwise
  +      */
  +    public void setVersion(String value) {
  +        
  +        if (needsSyncData()) {
  +            synchronizeData();
  +        }
  +    	version = value;
  +
  +    } // setVersion (String)
   
  -    } // getPublicId(String)
   
       /**
  -     * NON-DOM The system identifier associated with the entity. If not
  +     * DOM Level 2: The system identifier associated with the entity. If not
        * specified, this will be null. 
        */
       public void setSystemId(String id) {
  @@ -234,7 +304,7 @@
       } // setSystemId(String)
   
       /** 
  -     * NON-DOM Unparsed entities -- which contain non-XML data -- have a
  +     * DOM Level 2: Unparsed entities -- which contain non-XML data -- have a
        * "notation name" which tells applications how to deal with them.
        * Parsed entities, which <em>are</em> in XML format, don't need this and
        * set it to null.  
  
  
  
  1.8.2.3   +5 -1      xml-xerces/java/src/org/apache/xerces/dom/EntityReferenceImpl.java
  
  Index: EntityReferenceImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/EntityReferenceImpl.java,v
  retrieving revision 1.8.2.2
  retrieving revision 1.8.2.3
  diff -u -r1.8.2.2 -r1.8.2.3
  --- EntityReferenceImpl.java	2000/12/12 19:07:36	1.8.2.2
  +++ EntityReferenceImpl.java	2001/02/14 18:29:16	1.8.2.3
  @@ -107,11 +107,15 @@
    * structure-change-monitoring code I implemented to support
    * DeepNodeList.
    * 
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
  + * @author Ralf Pfeiffer, IBM
    * @version
    * @since  PR-DOM-Level-1-19980818.
    */
   public class EntityReferenceImpl 
  -    extends ChildAndParentNode
  +    extends ParentNode
       implements EntityReference {
   
       //
  
  
  
  1.10.2.3  +0 -1      xml-xerces/java/src/org/apache/xerces/dom/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/Makefile,v
  retrieving revision 1.10.2.2
  retrieving revision 1.10.2.3
  diff -u -r1.10.2.2 -r1.10.2.3
  --- Makefile	2000/12/12 19:07:36	1.10.2.2
  +++ Makefile	2001/02/14 18:29:16	1.10.2.3
  @@ -7,7 +7,6 @@
   	CDATASectionImpl.class\
   	CharacterDataImpl.class\
   	ChildNode.class\
  -	ChildAndParentNode.class\
   	CommentImpl.class\
   	DeepNodeListImpl.class\
   	DocumentFragmentImpl.class\
  
  
  
  1.24.2.3  +24 -0     xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java,v
  retrieving revision 1.24.2.2
  retrieving revision 1.24.2.3
  diff -u -r1.24.2.2 -r1.24.2.3
  --- NodeImpl.java	2000/12/12 19:07:37	1.24.2.2
  +++ NodeImpl.java	2001/02/14 18:29:16	1.24.2.3
  @@ -100,6 +100,8 @@
    * And when a node doesn't have an owner, ownerNode refers to its
    * ownerDocument.
    *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
    * @version
    * @since  PR-DOM-Level-1-19980818.
    */
  @@ -138,6 +140,8 @@
       protected final static short SPECIFIED    = 0x1<<5;
       protected final static short IGNORABLEWS  = 0x1<<6;
       protected final static short SETVALUE     = 0x1<<7;
  +    protected final static short HASSTRING    = 0x1<<8;
  +    protected final static short UNNORMALIZED = 0x1<<9;
   
       //
       // Constructors
  @@ -1365,6 +1369,26 @@
   
       final void setValueCalled(boolean value) {
           flags = (short) (value ? flags | SETVALUE : flags & ~SETVALUE);
  +    }
  +
  +    final boolean hasStringValue() {
  +        return (flags & HASSTRING) != 0;
  +    }
  +
  +    final void hasStringValue(boolean value) {
  +        flags = (short) (value ? flags | HASSTRING : flags & ~HASSTRING);
  +    }
  +
  +    final boolean isNormalized() {
  +        return (flags & UNNORMALIZED) == 0;
  +    }
  +
  +    final void isNormalized(boolean value) {
  +        // See if flag should propagate to parent.
  +        if (!value && isNormalized() && ownerNode != null) {
  +            ownerNode.isNormalized(false);
  +        }
  +        flags = (short) (value ? flags & ~UNNORMALIZED : flags | UNNORMALIZED);
       }
   
       //
  
  
  
  1.4.2.4   +389 -243  xml-xerces/java/src/org/apache/xerces/dom/ParentNode.java
  
  Index: ParentNode.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ParentNode.java,v
  retrieving revision 1.4.2.3
  retrieving revision 1.4.2.4
  diff -u -r1.4.2.3 -r1.4.2.4
  --- ParentNode.java	2000/12/12 19:07:37	1.4.2.3
  +++ ParentNode.java	2001/02/14 18:29:16	1.4.2.4
  @@ -1,4 +1,4 @@
  -/* $Id: ParentNode.java,v 1.4.2.3 2000/12/12 19:07:37 lehors Exp $ */
  +/* $Id: ParentNode.java,v 1.4.2.4 2001/02/14 18:29:16 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    *
  @@ -66,7 +66,7 @@
   import org.apache.xerces.dom.events.*;
   
   /**
  - * ParentNode inherits from NodeImpl and adds the capability of having child
  + * ParentNode inherits from ChildImpl and adds the capability of having child
    * nodes. Not every node in the DOM can have children, so only nodes that can
    * should inherit from this class and pay the price for it.
    * <P>
  @@ -74,15 +74,32 @@
    * return itself in response to the getChildNodes() query. This eliminiates
    * the need for a separate ChildNodeList object. Note that this is an
    * IMPLEMENTATION DETAIL; applications should _never_ assume that
  - * this identity exists.
  + * this identity exists. On the other hand, subclasses may need to override
  + * this, in case of conflicting names. This is the case for the classes
  + * HTMLSelectElementImpl and HTMLFormElementImpl of the HTML DOM.
    * <P>
    * While we have a direct reference to the first child, the last child is
    * stored as the previous sibling of the first child. First child nodes are
    * marked as being so, and getNextSibling hides this fact.
  + * <P>Note: Not all parent nodes actually need to also be a child. At some
  + * point we used to have ParentNode inheriting from NodeImpl and another class
  + * called ChildAndParentNode that inherited from ChildNode. But due to the lack
  + * of multiple inheritance a lot of code had to be duplicated which led to a
  + * maintenance nightmare. At the same time only a few nodes (Document,
  + * DocumentFragment, Entity, and Attribute) cannot be a child so the gain is
  + * memory wasn't really worth it. The only type for which this would be the
  + * case is Attribute, but we deal with there in another special way, so this is
  + * not applicable.
    *
  + * <p><b>WARNING</b>: Some of the code here is partially duplicated in
  + * AttrImpl, be careful to keep these two classes in sync!
  + *
  + * @author Arnaud  Le Hors, IBM
  + * @author Joe Kesselman, IBM
  + * @author Andy Clark, IBM
    */
   public abstract class ParentNode
  -    extends NodeImpl {
  +    extends ChildNode {
   
       /** Serialization version. */
       static final long serialVersionUID = 2815829867152120872L;
  @@ -96,13 +113,13 @@
       // transients
   
       /** Cached node list length. */
  -    protected transient int nodeListLength = -1;
  +    protected transient int fCachedLength = -1;
   
       /** Last requested node. */
  -    protected transient ChildNode nodeListNode;
  +    protected transient ChildNode fCachedChild;
   
       /** Last requested node index. */
  -    protected transient int nodeListIndex = -1;
  +    protected transient int fCachedChildIndex = -1;
   
       //
       // Constructors
  @@ -144,28 +161,26 @@
        */
       public Node cloneNode(boolean deep) {
       	
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
       	ParentNode newnode = (ParentNode) super.cloneNode(deep);
   
           // set owner document
           newnode.ownerDocument = ownerDocument;
   
  -        // REVISIT: Do we need to synchronize at this point? -Ac
  -        if (needsSyncChildren()) {
  -            synchronizeChildren();
  -        }
  -
       	// Need to break the association w/ original kids
       	newnode.firstChild      = null;
   
           // invalidate cache for children NodeList
  -        newnode.nodeListIndex = -1;
  -        newnode.nodeListLength = -1;
  +        newnode.fCachedChildIndex = -1;
  +        newnode.fCachedLength = -1;
   
           // Then, if deep, clone the kids too.
       	if (deep) {
  -            for (Node child = firstChild;
  +            for (ChildNode child = firstChild;
                    child != null;
  -                 child = child.getNextSibling()) {
  +                 child = child.nextSibling) {
                   newnode.appendChild(child.cloneNode(true));
               }
           }
  @@ -199,11 +214,12 @@
           if (needsSyncChildren()) {
               synchronizeChildren();
           }
  -	for (Node child = firstChild;
  -	     child != null; child = child.getNextSibling()) {
  -	    ((NodeImpl) child).setOwnerDocument(doc);
  -	}
  +        super.setOwnerDocument(doc);
           ownerDocument = doc;
  +	for (ChildNode child = firstChild;
  +	     child != null; child = child.nextSibling) {
  +	    child.setOwnerDocument(doc);
  +	}
       }
   
       /**
  @@ -231,7 +247,6 @@
        * differently.
        */
       public NodeList getChildNodes() {
  -        // JKESS: KNOWN ISSUE HERE 
   
           if (needsSyncChildren()) {
               synchronizeChildren();
  @@ -314,41 +329,8 @@
       Node internalInsertBefore(Node newChild, Node refChild,int mutationMask) 
           throws DOMException {
   
  -    	if (isReadOnly())
  -            throw new DOMException(
  -                        DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -                        "DOM001 Modification not allowed");
  -
           boolean errorChecking = ownerDocument.errorChecking;
  -    	if (errorChecking && newChild.getOwnerDocument() != ownerDocument) {
  -            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  -                                       "DOM005 Wrong document");
  -        }
  -
  -        if (needsSyncChildren()) {
  -            synchronizeChildren();
  -        }
  -
  -        if (errorChecking) {
  -            // Prevent cycles in the tree
  -            boolean treeSafe = true;
  -            for (NodeImpl a = parentNode();
  -                 treeSafe && a != null;
  -                 a = a.parentNode()) {
  -                treeSafe = newChild != a;
  -            }
  -            if(!treeSafe) {
  -                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  -                                           "DOM006 Hierarchy request error");
  -            }
   
  -            // refChild must in fact be a child of this node (or null)
  -            if(refChild != null && refChild.getParentNode() != this) {
  -                throw new DOMException(DOMException.NOT_FOUND_ERR,
  -                                           "DOM008 Not found");
  -            }
  -        }
  -        
           if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) {
               // SLOW BUT SAFE: We could insert the whole subtree without
               // juggling so many next/previous pointers. (Wipe out the
  @@ -367,174 +349,210 @@
   
               // No need to check kids for right-document; if they weren't,
               // they wouldn't be kids of that DocFrag.
  -            for (Node kid = newChild.getFirstChild(); // Prescan
  -                 kid != null;
  -                 kid = kid.getNextSibling()) {
  +            if (errorChecking) {
  +                for (Node kid = newChild.getFirstChild(); // Prescan
  +                     kid != null; kid = kid.getNextSibling()) {
   
  -                if (errorChecking && !ownerDocument.isKidOK(this, kid)) {
  -                    throw new DOMException(
  +                    if (!ownerDocument.isKidOK(this, kid)) {
  +                        throw new DOMException(
                                              DOMException.HIERARCHY_REQUEST_ERR, 
                                              "DOM006 Hierarchy request error");
  +                    }
                   }
               }
   
               while (newChild.hasChildNodes()) {
                   insertBefore(newChild.getFirstChild(), refChild);
               }
  +            return newChild;
           }
  -        else if (errorChecking &&
  -                 (!(newChild instanceof ChildNode)
  -                  ||
  -                  !ownerDocument.isKidOK(this, newChild))) {
  -            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  -                                       "DOM006 Hierarchy request error");
  +
  +        if (newChild == refChild) {
  +            // stupid case that must be handled as a no-op triggering events...
  +            refChild = refChild.getNextSibling();
  +            removeChild(newChild);
  +            insertBefore(newChild, refChild);
  +            return newChild;
           }
  -        else {
  -            // Convert to internal type, to avoid repeated casting
  -            ChildNode newInternal = (ChildNode)newChild;
  +
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
   
  -            EnclosingAttr enclosingAttr=null;
  -            if(MUTATIONEVENTS && ownerDocument.mutationEvents
  -               && (mutationMask&MUTATION_AGGREGATE)!=0)
  +        if (errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                       "DOM001 Modification not allowed");
  +            }
  +            if (newChild.getOwnerDocument() != ownerDocument) {
  +                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
  +                                       "DOM005 Wrong document");
  +            }
  +            if (!ownerDocument.isKidOK(this, newChild)) {
  +                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                       "DOM006 Hierarchy request error");
  +            }
  +            // refChild must be a child of this node (or null)
  +            if (refChild != null && refChild.getParentNode() != this) {
  +                throw new DOMException(DOMException.NOT_FOUND_ERR,
  +                                       "DOM008 Not found");
  +            }
  +
  +            // Prevent cycles in the tree
  +            // newChild cannot be ancestor of this Node,
  +            // and actually cannot be this
  +            boolean treeSafe = true;
  +            for (NodeImpl a = this; treeSafe && a != null; a = a.parentNode())
               {
  -                // MUTATION PREPROCESSING
  -                // No direct pre-events, but if we're within the scope 
  -    	        // of an Attr and DOMAttrModified was requested,
  -                // we need to preserve its previous value.
  -                LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
  -                if(lc.captures+lc.bubbles+lc.defaults>0)
  -                {
  -                    enclosingAttr=getEnclosingAttr();
  -                }
  +                treeSafe = newChild != a;
               }
  +            if(!treeSafe) {
  +                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
  +                                       "DOM006 Hierarchy request error");
  +            }
  +        }
   
  -            Node oldparent = newInternal.parentNode();
  -            if (oldparent != null) {
  -                oldparent.removeChild(newInternal);
  -            }
  -
  -            // Convert to internal type, to avoid repeated casting
  -            ChildNode refInternal = (ChildNode)refChild;
  -
  -            // Attach up
  -            newInternal.ownerNode = this;
  -            newInternal.isOwned(true);
  -
  -            // Attach before and after
  -            // Note: firstChild.previousSibling == lastChild!!
  -            if (firstChild == null) {
  -                // this our first and only child
  -                firstChild = newInternal;
  -                newInternal.isFirstChild(true);
  -                newInternal.previousSibling = newInternal;
  -            } else {
  -                if (refInternal == null) {
  -                    // this is an append
  -                    ChildNode lastChild = firstChild.previousSibling;
  -                    lastChild.nextSibling = newInternal;
  -                    newInternal.previousSibling = lastChild;
  +        EnclosingAttr enclosingAttr=null;
  +        if (MUTATIONEVENTS && ownerDocument.mutationEvents
  +            && (mutationMask&MUTATION_AGGREGATE)!=0) {
  +            // MUTATION PREPROCESSING
  +            // No direct pre-events, but if we're within the scope 
  +            // of an Attr and DOMAttrModified was requested,
  +            // we need to preserve its previous value.
  +            LCount lc=LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
  +            if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                enclosingAttr=getEnclosingAttr();
  +            }
  +        }
  +
  +        // Convert to internal type, to avoid repeated casting
  +        ChildNode newInternal = (ChildNode)newChild;
  +
  +        Node oldparent = newInternal.parentNode();
  +        if (oldparent != null) {
  +            oldparent.removeChild(newInternal);
  +        }
  +
  +        // Convert to internal type, to avoid repeated casting
  +        ChildNode refInternal = (ChildNode)refChild;
  +
  +        // Attach up
  +        newInternal.ownerNode = this;
  +        newInternal.isOwned(true);
  +
  +        // Attach before and after
  +        // Note: firstChild.previousSibling == lastChild!!
  +        if (firstChild == null) {
  +            // this our first and only child
  +            firstChild = newInternal;
  +            newInternal.isFirstChild(true);
  +            newInternal.previousSibling = newInternal;
  +        }
  +        else {
  +            if (refInternal == null) {
  +                // this is an append
  +                ChildNode lastChild = firstChild.previousSibling;
  +                lastChild.nextSibling = newInternal;
  +                newInternal.previousSibling = lastChild;
  +                firstChild.previousSibling = newInternal;
  +            }
  +            else {
  +                // this is an insert
  +                if (refChild == firstChild) {
  +                    // at the head of the list
  +                    firstChild.isFirstChild(false);
  +                    newInternal.nextSibling = firstChild;
  +                    newInternal.previousSibling = firstChild.previousSibling;
                       firstChild.previousSibling = newInternal;
  -                } else {
  -                    // this is an insert
  -                    if (refChild == firstChild) {
  -                        // at the head of the list
  -                        firstChild.isFirstChild(false);
  -                        newInternal.nextSibling = firstChild;
  -                        newInternal.previousSibling =
  -                            firstChild.previousSibling;
  -                        firstChild.previousSibling = newInternal;
  -                        firstChild = newInternal;
  -                        newInternal.isFirstChild(true);
  -                    } else {
  -                        // somewhere in the middle
  -                        ChildNode prev = refInternal.previousSibling;
  -                        newInternal.nextSibling = refInternal;
  -                        prev.nextSibling = newInternal;
  -                        refInternal.previousSibling = newInternal;
  -                        newInternal.previousSibling = prev;
  -                    }
  +                    firstChild = newInternal;
  +                    newInternal.isFirstChild(true);
                   }
  +                else {
  +                    // somewhere in the middle
  +                    ChildNode prev = refInternal.previousSibling;
  +                    newInternal.nextSibling = refInternal;
  +                    prev.nextSibling = newInternal;
  +                    refInternal.previousSibling = newInternal;
  +                    newInternal.previousSibling = prev;
  +                }
               }
  +        }
   
  -            changed();
  +        changed();
   
  -            // update cached length if we have any
  -            if (nodeListLength != -1) {
  -                nodeListLength++;
  -            }
  -            if (nodeListIndex != -1) {
  -                // if we happen to insert just before the cached node, update
  -                // the cache to the new node to match the cached index
  -                if (nodeListNode == refInternal) {
  -                    nodeListNode = newInternal;
  -                } else {
  -                    // otherwise just invalidate the cache
  -                    nodeListIndex = -1;
  -                }
  +        // update cached length if we have any
  +        if (fCachedLength != -1) {
  +            fCachedLength++;
  +        }
  +        if (fCachedChildIndex != -1) {
  +            // if we happen to insert just before the cached node, update
  +            // the cache to the new node to match the cached index
  +            if (fCachedChild == refInternal) {
  +                fCachedChild = newInternal;
  +            } else {
  +                // otherwise just invalidate the cache
  +                fCachedChildIndex = -1;
               }
  +        }
   
  -            if(MUTATIONEVENTS && ownerDocument.mutationEvents)
  -            {
  -                // MUTATION POST-EVENTS:
  -                // "Local" events (non-aggregated)
  -                if( (mutationMask&MUTATION_LOCAL) != 0)
  -                {
  -                    // New child is told it was inserted, and where
  -                    LCount lc =
  -                        LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED);
  -                    if(lc.captures+lc.bubbles+lc.defaults>0)
  -                    {
  -                        MutationEvent me= new MutationEventImpl();
  -                        me.initMutationEvent(
  -                                          MutationEventImpl.DOM_NODE_INSERTED,
  -                                          true,false,this,null,
  +        if (MUTATIONEVENTS && ownerDocument.mutationEvents) {
  +            // MUTATION POST-EVENTS:
  +            // "Local" events (non-aggregated)
  +            if ((mutationMask&MUTATION_LOCAL) != 0) {
  +                // New child is told it was inserted, and where
  +                LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED);
  +                if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                    MutationEvent me= new MutationEventImpl();
  +                    me.initMutationEvent(MutationEventImpl.DOM_NODE_INSERTED,
  +                                         true,false,this,null,
                                             null,null,(short)0);
  -                        newInternal.dispatchEvent(me);
  -                    }
  +                    newInternal.dispatchEvent(me);
  +                }
   
  -                    // If within the Document, tell the subtree it's been added
  -                    // to the Doc.
  -                    lc=LCount.lookup(
  +                // If within the Document, tell the subtree it's been added
  +                // to the Doc.
  +                lc=LCount.lookup(
                               MutationEventImpl.DOM_NODE_INSERTED_INTO_DOCUMENT);
  -                    if(lc.captures+lc.bubbles+lc.defaults>0)
  -                    {
  -                        NodeImpl eventAncestor=this;
  -                        if(enclosingAttr!=null) 
  -                            eventAncestor=
  -                              (NodeImpl)(enclosingAttr.node.getOwnerElement());
  -                        if(eventAncestor!=null) // Might have been orphan Attr
  -                        {
  -                            NodeImpl p=eventAncestor;
  -                            while(p!=null)
  -                            {
  -                                eventAncestor=p; // Last non-null ancestor
  -                                // In this context, ancestry includes
  -                                // walking back from Attr to Element
  -                                if(p.getNodeType()==ATTRIBUTE_NODE)
  -                                    p=(ElementImpl)
  -                                        ((AttrImpl)p).getOwnerElement();
  -                                else
  -                                    p=p.parentNode();
  +                if (lc.captures+lc.bubbles+lc.defaults>0) {
  +                    NodeImpl eventAncestor=this;
  +                    if (enclosingAttr!=null) 
  +                        eventAncestor=
  +                            (NodeImpl)(enclosingAttr.node.getOwnerElement());
  +                    if (eventAncestor!=null) { // Might have been orphan Attr
  +                        NodeImpl p=eventAncestor;
  +                        while (p!=null) {
  +                            eventAncestor=p; // Last non-null ancestor
  +                            // In this context, ancestry includes
  +                            // walking back from Attr to Element
  +                            if(p.getNodeType()==ATTRIBUTE_NODE) {
  +                                p=(ElementImpl)((AttrImpl)p).getOwnerElement();
                               }
  -                            if(eventAncestor.getNodeType()==Node.DOCUMENT_NODE)
  -                            {
  -                                MutationEvent me= new MutationEventImpl();
  -                                me.initMutationEvent(MutationEventImpl
  -                                              .DOM_NODE_INSERTED_INTO_DOCUMENT,
  -                                                     false,false,null,null,
  -                                                     null,null,(short)0);
  -                                dispatchEventToSubtree(newInternal,me);
  +                            else {
  +                                p=p.parentNode();
                               }
                           }
  +                        if(eventAncestor.getNodeType()==Node.DOCUMENT_NODE) {
  +                            MutationEvent me= new MutationEventImpl();
  +                            me.initMutationEvent(MutationEventImpl
  +                                              .DOM_NODE_INSERTED_INTO_DOCUMENT,
  +                                                 false,false,null,null,
  +                                                 null,null,(short)0);
  +                            dispatchEventToSubtree(newInternal,me);
  +                        }
                       }
                   }
  +            }
   
  -                // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified
  -                // (Common to most kinds of mutation)
  -                if( (mutationMask&MUTATION_AGGREGATE) != 0)
  -                    dispatchAggregateEvents(enclosingAttr);
  +            // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified
  +            // (Common to most kinds of mutation)
  +            if ((mutationMask&MUTATION_AGGREGATE) != 0) {
  +                dispatchAggregateEvents(enclosingAttr);
               }
           }
  +
  +        checkNormalizationAfterInsert(newInternal);
  +
           return newChild;
   
       } // internalInsertBefore(Node,Node,int):Node
  @@ -565,16 +583,17 @@
       Node internalRemoveChild(Node oldChild,int mutationMask)
           throws DOMException {
   
  -        if (isReadOnly()) {
  -            throw new DOMException(
  -                DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  -                "DOM001 Modification not allowed");
  -        }
  -         
  -        if (ownerDocument.errorChecking && 
  -            oldChild != null && oldChild.getParentNode() != this) {
  -            throw new DOMException(DOMException.NOT_FOUND_ERR, 
  +        DocumentImpl ownerDocument = ownerDocument();
  +        if (ownerDocument.errorChecking) {
  +            if (isReadOnly()) {
  +                throw new DOMException(
  +                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
  +                                     "DOM001 Modification not allowed");
  +            }
  +            if (oldChild != null && oldChild.getParentNode() != this) {
  +                throw new DOMException(DOMException.NOT_FOUND_ERR, 
                                          "DOM008 Not found");
  +            }
           }
   
           // notify document
  @@ -641,18 +660,18 @@
           } // End mutation preprocessing
   
           // update cached length if we have any
  -        if (nodeListLength != -1) {
  -            nodeListLength--;
  +        if (fCachedLength != -1) {
  +            fCachedLength--;
           }
  -        if (nodeListIndex != -1) {
  +        if (fCachedChildIndex != -1) {
               // if the removed node is the cached node
               // move the cache to its (soon former) previous sibling
  -            if (nodeListNode == oldInternal) {
  -                nodeListIndex--;
  -                nodeListNode = oldInternal.previousSibling();
  +            if (fCachedChild == oldInternal) {
  +                fCachedChildIndex--;
  +                fCachedChild = oldInternal.previousSibling();
               } else {
                   // otherwise just invalidate the cache
  -                nodeListIndex = -1;
  +                fCachedChildIndex = -1;
               }
           }
   
  @@ -679,6 +698,9 @@
               }
           }
   
  +        // Save previous sibling for normalization checking.
  +        ChildNode oldPreviousSibling = oldInternal.previousSibling();
  +
           // Remove oldInternal's references to tree
           oldInternal.ownerNode       = ownerDocument;
           oldInternal.isOwned(false);
  @@ -696,6 +718,8 @@
                   dispatchAggregateEvents(enclosingAttr);
           } // End mutation postprocessing
   
  +        checkNormalizationAfterRemove(oldPreviousSibling);
  +
           return oldInternal;
   
       } // internalRemoveChild(Node,int):Node
  @@ -744,7 +768,9 @@
           } // End mutation preprocessing
   
           internalInsertBefore(newChild, oldChild,MUTATION_LOCAL);
  -        internalRemoveChild(oldChild,MUTATION_LOCAL);
  +        if (newChild != oldChild) {
  +            internalRemoveChild(oldChild,MUTATION_LOCAL);
  +        }
   
           if(MUTATIONEVENTS && ownerDocument.mutationEvents)
           {
  @@ -759,65 +785,116 @@
       //
   
       /**
  -     * NodeList method: Count the immediate children of this node
  +     * Count the immediate children of this node.  Use to implement
  +     * NodeList.getLength().
        * @return int
        */
  -    public int getLength() {
  +    private int nodeListGetLength() {
   
  -        if (nodeListLength == -1) { // is the cached length invalid ?
  +        if (fCachedLength == -1) { // is the cached length invalid ?
               ChildNode node;
               // start from the cached node if we have one
  -            if (nodeListIndex != -1 && nodeListNode != null) {
  -                nodeListLength = nodeListIndex;
  -                node = nodeListNode;
  +            if (fCachedChildIndex != -1 && fCachedChild != null) {
  +                fCachedLength = fCachedChildIndex;
  +                node = fCachedChild;
               } else {
                   node = firstChild;
  -                nodeListLength = 0;
  +                fCachedLength = 0;
               }
               for (; node != null; node = node.nextSibling) {
  -                nodeListLength++;
  +                fCachedLength++;
               }
           }
   
  -        return nodeListLength;
  +        return fCachedLength;
   
  -    } // getLength():int
  +    } // nodeListGetLength():int
   
       /**
  -     * NodeList method: Return the Nth immediate child of this node, or
  -     * null if the index is out of bounds.
  -     * @return org.w3c.dom.Node
  -     * @param Index int
  +     * NodeList method: Count the immediate children of this node
  +     * @return int
        */
  -    public Node item(int index) {
  +    public int getLength() {
  +        return nodeListGetLength();
  +    }
  +
  +    /**
  +     * Return the Nth immediate child of this node, or null if the index is
  +     * out of bounds.  Use to implement NodeList.item().
  +     * @param index int
  +     */
  +    private Node nodeListItem(int index) {
           // short way
  -        if (nodeListIndex != -1 && nodeListNode != null) {
  -            if (nodeListIndex < index) {
  -                while (nodeListIndex < index && nodeListNode != null) {
  -                    nodeListIndex++;
  -                    nodeListNode = nodeListNode.nextSibling;
  +        if (fCachedChildIndex != -1 && fCachedChild != null) {
  +            if (fCachedChildIndex < index) {
  +                while (fCachedChildIndex < index && fCachedChild != null) {
  +                    fCachedChildIndex++;
  +                    fCachedChild = fCachedChild.nextSibling;
                   }
               }
  -            else if (nodeListIndex > index) {
  -                while (nodeListIndex > index && nodeListNode != null) {
  -                    nodeListIndex--;
  -                    nodeListNode = nodeListNode.previousSibling();
  +            else if (fCachedChildIndex > index) {
  +                while (fCachedChildIndex > index && fCachedChild != null) {
  +                    fCachedChildIndex--;
  +                    fCachedChild = fCachedChild.previousSibling();
                   }
               }
  -            return nodeListNode;
  +            return fCachedChild;
           }
   
           // long way
  -        nodeListNode = firstChild;
  -        for (nodeListIndex = 0; 
  -             nodeListIndex < index && nodeListNode != null; 
  -             nodeListIndex++) {
  -            nodeListNode = nodeListNode.nextSibling;
  +        fCachedChild = firstChild;
  +        for (fCachedChildIndex = 0; 
  +             fCachedChildIndex < index && fCachedChild != null; 
  +             fCachedChildIndex++) {
  +            fCachedChild = fCachedChild.nextSibling;
           }
  -        return nodeListNode;
  +        return fCachedChild;
  +
  +    } // nodeListItem(int):Node
   
  +    /**
  +     * NodeList method: Return the Nth immediate child of this node, or
  +     * null if the index is out of bounds.
  +     * @return org.w3c.dom.Node
  +     * @param index int
  +     */
  +    public Node item(int index) {
  +        return nodeListItem(index);
       } // item(int):Node
   
  +    /**
  +     * Create a NodeList to access children that is use by subclass elements
  +     * that have methods named getLength() or item(int).  ChildAndParentNode
  +     * optimizes getChildNodes() by implementing NodeList itself.  However if
  +     * a subclass Element implements methods with the same name as the NodeList
  +     * methods, they will override the actually methods in this class.
  +     * <p>
  +     * To use this method, the subclass should implement getChildNodes() and
  +     * have it call this method.  The resulting NodeList instance maybe
  +     * shared and cached in a transient field, but the cached value must be
  +     * cleared if the node is cloned.
  +     */
  +    protected final NodeList getChildNodesUnoptimized() {
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        return new NodeList() {
  +                /**
  +                 * @see NodeList.getLength()
  +                 */
  +                public int getLength() {
  +                    return nodeListGetLength();
  +                } // getLength():int
  +                
  +                /**
  +                 * @see NodeList.item(int)
  +                 */
  +                public Node item(int index) {
  +                    return nodeListItem(index);
  +                } // item(int):Node
  +            };
  +    } // getChildNodesUnoptimized():NodeList
  +
       //
       // DOM2: methods, getters, setters
       //
  @@ -828,11 +905,18 @@
        * to take action.
        */
       public void normalize() {
  -
  -        Node kid;
  -        for (kid = firstChild; kid != null; kid = kid.getNextSibling()) {
  +        // No need to normalize if already normalized.
  +        if (isNormalized()) {
  +            return;
  +        }
  +        if (needsSyncChildren()) {
  +            synchronizeChildren();
  +        }
  +        ChildNode kid;
  +        for (kid = firstChild; kid != null; kid = kid.nextSibling) {
               kid.normalize();
           }
  +        isNormalized(true);
       }
   
       //
  @@ -861,7 +945,7 @@
               for (ChildNode mykid = firstChild;
                    mykid != null;
                    mykid = mykid.nextSibling) {
  -                if(!(mykid instanceof EntityReference)) {
  +                if (mykid.getNodeType() != Node.ENTITY_REFERENCE_NODE) {
                       mykid.setReadOnly(readOnly,true);
                   }
               }
  @@ -932,6 +1016,68 @@
       } // synchronizeChildren()
       /***/
   
  +    /**
  +     * Checks the normalized state of this node after inserting a child.
  +     * If the inserted child causes this node to be unnormalized, then this
  +     * node is flagged accordingly.
  +     * The conditions for changing the normalized state are:
  +     * <ul>
  +     * <li>The inserted child is a text node and one of its adjacent siblings
  +     * is also a text node.
  +     * <li>The inserted child is is itself unnormalized.
  +     * </ul>
  +     *
  +     * @param insertedChild the child node that was inserted into this node
  +     *
  +     * @throws NullPointerException if the inserted child is <code>null</code>
  +     */
  +    void checkNormalizationAfterInsert(ChildNode insertedChild) {
  +        // See if insertion caused this node to be unnormalized.
  +        if (insertedChild.getNodeType() == Node.TEXT_NODE) {
  +            ChildNode prev = insertedChild.previousSibling();
  +            ChildNode next = insertedChild.nextSibling;
  +            // If an adjacent sibling of the new child is a text node,
  +            // flag this node as unnormalized.
  +            if ((prev != null && prev.getNodeType() == Node.TEXT_NODE) ||
  +                (next != null && next.getNodeType() == Node.TEXT_NODE)) {
  +                isNormalized(false);
  +            }
  +        }
  +        else {
  +            // If the new child is not normalized,
  +            // then this node is inherently not normalized.
  +            if (!insertedChild.isNormalized()) {
  +                isNormalized(false);
  +            }
  +        }
  +    } // checkNormalizationAfterInsert(ChildNode)
  +
  +    /**
  +     * Checks the normalized of this node after removing a child.
  +     * If the removed child causes this node to be unnormalized, then this
  +     * node is flagged accordingly.
  +     * The conditions for changing the normalized state are:
  +     * <ul>
  +     * <li>The removed child had two adjacent siblings that were text nodes.
  +     * </ul>
  +     *
  +     * @param previousSibling the previous sibling of the removed child, or
  +     * <code>null</code>
  +     */
  +    void checkNormalizationAfterRemove(ChildNode previousSibling) {
  +        // See if removal caused this node to be unnormalized.
  +        // If the adjacent siblings of the removed child were both text nodes,
  +        // flag this node as unnormalized.
  +        if (previousSibling != null &&
  +            previousSibling.getNodeType() == Node.TEXT_NODE) {
  +
  +            ChildNode next = previousSibling.nextSibling;
  +            if (next != null && next.getNodeType() == Node.TEXT_NODE) {
  +                isNormalized(false);
  +            }
  +        }
  +    } // checkNormalizationAfterRemove(Node)
  +
       //
       // Serialization methods
       //
  @@ -961,8 +1107,8 @@
           needsSyncChildren(false);
   
           // initialize transients
  -        nodeListLength = -1;
  -        nodeListIndex = -1;
  +        fCachedLength = -1;
  +        fCachedChildIndex = -1;
   
       } // readObject(ObjectInputStream)
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.3   +1 -2      xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java
  
  Index: DocumentBuilderFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java,v
  retrieving revision 1.1.4.2
  retrieving revision 1.1.4.3
  diff -u -r1.1.4.2 -r1.1.4.3
  --- DocumentBuilderFactoryImpl.java	2001/02/02 23:06:56	1.1.4.2
  +++ DocumentBuilderFactoryImpl.java	2001/02/14 18:29:19	1.1.4.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: DocumentBuilderFactoryImpl.java,v 1.1.4.2 2001/02/02 23:06:56 edwingo Exp $
  + * $Id: DocumentBuilderFactoryImpl.java,v 1.1.4.3 2001/02/14 18:29:19 lehors Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -65,7 +65,6 @@
   
   /**
    * @author Rajiv Mordani
  - * @version $Revision: 1.1.4.2 $
    */
   public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
   
  
  
  
  1.1.4.5   +11 -15    xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
  
  Index: DocumentBuilderImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java,v
  retrieving revision 1.1.4.4
  retrieving revision 1.1.4.5
  diff -u -r1.1.4.4 -r1.1.4.5
  --- DocumentBuilderImpl.java	2001/02/13 02:55:25	1.1.4.4
  +++ DocumentBuilderImpl.java	2001/02/14 18:29:19	1.1.4.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: DocumentBuilderImpl.java,v 1.1.4.4 2001/02/13 02:55:25 edwingo Exp $
  + * $Id: DocumentBuilderImpl.java,v 1.1.4.5 2001/02/14 18:29:19 lehors Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -82,7 +82,6 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.1.4.4 $
    */
   public class DocumentBuilderImpl extends DocumentBuilder {
       /** Xerces features */
  @@ -127,19 +126,16 @@
               domParser.setFeature("http://xml.org/sax/features/namespaces",
                                    namespaceAware);
   
  -            // XXX Ignore unimplemented features for now
  -            try {
  -                // Set various parameters obtained from DocumentBuilderFactory
  -                domParser.setFeature(XERCES_FEATURE_PREFIX +
  -                                     INCLUDE_IGNORABLE_WHITESPACE,
  -                                     !dbf.isIgnoringElementContentWhitespace());
  -                domParser.setFeature(XERCES_FEATURE_PREFIX +
  -                                     CREATE_ENTITY_REF_NODES_FEATURE,
  -                                     !dbf.isExpandEntityReferences());
  -                // XXX No way to control dbf.isIgnoringComments() or
  -                // dbf.isCoalescing()
  -            } catch (SAXException e) {
  -            }
  +            // Set various parameters obtained from DocumentBuilderFactory
  +            domParser.setFeature(XERCES_FEATURE_PREFIX +
  +                                 INCLUDE_IGNORABLE_WHITESPACE,
  +                                 !dbf.isIgnoringElementContentWhitespace());
  +            domParser.setFeature(XERCES_FEATURE_PREFIX +
  +                                 CREATE_ENTITY_REF_NODES_FEATURE,
  +                                 !dbf.isExpandEntityReferences());
  +
  +            // XXX No way to control dbf.isIgnoringComments() or
  +            // dbf.isCoalescing()
           } catch (SAXException e) {
               // Handles both SAXNotSupportedException, SAXNotRecognizedException
               throw new ParserConfigurationException(e.getMessage());
  
  
  
  1.1.4.3   +1 -2      xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java
  
  Index: SAXParserFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java,v
  retrieving revision 1.1.4.2
  retrieving revision 1.1.4.3
  diff -u -r1.1.4.2 -r1.1.4.3
  --- SAXParserFactoryImpl.java	2001/02/02 23:06:54	1.1.4.2
  +++ SAXParserFactoryImpl.java	2001/02/14 18:29:19	1.1.4.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SAXParserFactoryImpl.java,v 1.1.4.2 2001/02/02 23:06:54 edwingo Exp $
  + * $Id: SAXParserFactoryImpl.java,v 1.1.4.3 2001/02/14 18:29:19 lehors Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -72,7 +72,6 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.1.4.2 $
    */
   
   /**
  
  
  
  1.1.4.4   +1 -2      xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java
  
  Index: SAXParserImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/jaxp/SAXParserImpl.java,v
  retrieving revision 1.1.4.3
  retrieving revision 1.1.4.4
  diff -u -r1.1.4.3 -r1.1.4.4
  --- SAXParserImpl.java	2001/02/13 03:27:37	1.1.4.3
  +++ SAXParserImpl.java	2001/02/14 18:29:19	1.1.4.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SAXParserImpl.java,v 1.1.4.3 2001/02/13 03:27:37 edwingo Exp $
  + * $Id: SAXParserImpl.java,v 1.1.4.4 2001/02/14 18:29:19 lehors Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -78,7 +78,6 @@
   /**
    * @author Rajiv Mordani
    * @author Edwin Goei
  - * @version $Revision: 1.1.4.3 $
    */
   
   /**
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.16.2.3  +29 -29    xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java
  
  Index: BaseMarkupSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java,v
  retrieving revision 1.16.2.2
  retrieving revision 1.16.2.3
  diff -u -r1.16.2.2 -r1.16.2.3
  --- BaseMarkupSerializer.java	2000/12/12 19:07:55	1.16.2.2
  +++ BaseMarkupSerializer.java	2001/02/14 18:29:20	1.16.2.3
  @@ -134,7 +134,7 @@
    * another element.
    *
    *
  - * @version $Revision: 1.16.2.2 $ $Date: 2000/12/12 19:07:55 $
  + * @version $Revision: 1.16.2.3 $ $Date: 2001/02/14 18:29:20 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    * @see Serializer
    * @see DOMSerializer
  @@ -145,14 +145,7 @@
   {
   
   
  -    /**
  -     * Identifies the last printable character in the Unicode range
  -     * that is supported by the encoding used with this serializer.
  -     * For 8-bit encodings this will be either 0x7E or 0xFF.
  -     * For 16-bit encodings this will be 0xFFFF. Characters that are
  -     * not printable will be escaped using character references.
  -     */
  -    private int              _lastPrintable = 0x7E;
  +    private EncodingInfo _encodingInfo;
   
   
       /**
  @@ -294,8 +287,6 @@
   
       public void setOutputByteStream( OutputStream output )
       {
  -        String encoding;
  -
           if ( output == null )
               throw new NullPointerException( "SER001 Argument 'output' is null." );
           _output = output;
  @@ -343,17 +334,12 @@
           // If the output stream has been set, use it to construct
           // the writer. It is possible that the serializer has been
           // reused with the same output stream and different encoding.
  +
  +        _encodingInfo = _format.getEncodingInfo();
  +
           if ( _output != null ) {
  -            if ( _format.getEncoding() == null )
  -                _writer = new OutputStreamWriter( _output );
  -            else
  -                _writer = Encodings.getWriter( _output, _format.getEncoding() );
  +            _writer = _encodingInfo.getWriter(_output);
           }
  -        // Determine the last printable character.
  -        if ( _format.getEncoding() == null )
  -            _lastPrintable = Encodings.getLastPrintable();
  -        else
  -            _lastPrintable = Encodings.getLastPrintable( _format.getEncoding() );
   
           if ( _format.getIndenting() ) {
               _indenting = true;
  @@ -1125,7 +1111,7 @@
        * @param ch Character value
        * @return Character entity name, or null
        */
  -    protected abstract String getEntityRef( char ch );
  +    protected abstract String getEntityRef(int ch);
   
   
       /**
  @@ -1275,7 +1261,7 @@
       }
   
   
  -    protected void printEscaped( char ch )
  +    protected void printEscaped(int ch)
       {
           String charRef;
   
  @@ -1288,16 +1274,21 @@
               _printer.printText( '&' );
               _printer.printText( charRef );
               _printer.printText( ';' );
  -        } else if ( ( ch >= ' ' && ch <= _lastPrintable && ch != 0xF7 ) ||
  +        } else if ( ( ch >= ' ' && _encodingInfo.isPrintable(ch) && ch != 0xF7 ) ||
                       ch == '\n' || ch == '\r' || ch == '\t' ) {
               // If the character is not printable, print as character reference.
               // Non printables are below ASCII space but not tab or line
               // terminator, ASCII delete, or above a certain Unicode threshold.
  -            _printer.printText( ch );
  +            if (ch < 0x10000) {
  +                _printer.printText((char)ch );
  +            } else {
  +                _printer.printText((char)(((ch-0x10000)>>10)+0xd800));
  +                _printer.printText((char)(((ch-0x10000)&0x3ff)+0xdc00));
  +            }
           } else {
  -            _printer.printText( "&#" );
  -            _printer.printText( Integer.toString( ch ) );
  -            _printer.printText( ';' );
  +            _printer.printText("&#x");
  +            _printer.printText(Integer.toHexString(ch));
  +            _printer.printText(';');
           }
       }
   
  @@ -1312,8 +1303,17 @@
        */
       protected void printEscaped( String source )
       {
  -        for ( int i = 0 ; i < source.length() ; ++i )
  -            printEscaped( source.charAt( i ) );
  +        for ( int i = 0 ; i < source.length() ; ++i ) {
  +            int ch = source.charAt(i);
  +            if ((ch & 0xfc00) == 0xd800 && i+1 < source.length()) {
  +                int lowch = source.charAt(i+1);
  +                if ((lowch & 0xfc00) == 0xdc00) {
  +                    ch = 0x10000 + ((ch-0xd800)<<10) + lowch-0xdc00;
  +                    i++;
  +                }
  +            }
  +            printEscaped(ch);
  +        }
       }
   
   
  
  
  
  1.1.4.2   +38 -87    xml-xerces/java/src/org/apache/xml/serialize/Encodings.java
  
  Index: Encodings.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/Encodings.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- Encodings.java	2000/11/30 00:16:45	1.1.4.1
  +++ Encodings.java	2001/02/14 18:29:21	1.1.4.2
  @@ -71,7 +71,7 @@
    * to override encoding names and provide the last printable character
    * for each encoding.
    *
  - * @version $Revision: 1.1.4.1 $ $Date: 2000/11/30 00:16:45 $
  + * @version $Revision: 1.1.4.2 $ $Date: 2001/02/14 18:29:21 $
    * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
    */
   class Encodings
  @@ -83,104 +83,55 @@
        */
       static final int DefaultLastPrintable = 0x7F;
   
  -
  -    /**
  -     * Returns a writer for the specified encoding based on
  -     * an output stream.
  -     *
  -     * @param output The output stream
  -     * @param encoding The encoding
  -     * @return A suitable writer
  -     * @throws UnsupportedEncodingException There is no convertor
  -     *  to support this encoding
  -     */
  -    static Writer getWriter( OutputStream output, String encoding )
  -        throws UnsupportedEncodingException
  -    {
  -        for ( int i = 0 ; i < _encodings.length ; ++i ) {
  -            if ( _encodings[ i ].name.equals( encoding ) )
  -                return new OutputStreamWriter( output, _encodings[ i ].javaName );
  -        }
  -        return new OutputStreamWriter( output, encoding );
  -    }
  -
  -
       /**
  -     * Returns the last printable character for the specified
  -     * encoding.
  -     *
  -     * @param encoding The encoding
  -     * @return The last printable character
  +     * @param encoding a MIME charset name, or null.
        */
  -    static int getLastPrintable( String encoding )
  -    {
  -        for ( int i = 0 ; i < _encodings.length ; ++i ) {
  -            if ( _encodings[ i ].name.equalsIgnoreCase( encoding ) )
  -                return _encodings[ i ].lastPrintable;
  +    static EncodingInfo getEncodingInfo(String encoding) {
  +        if (encoding == null)
  +            return new EncodingInfo(null, DefaultLastPrintable);
  +        for (int i = 0;  i < _encodings.length;  i++) {
  +            if (_encodings[i].name.equalsIgnoreCase(encoding))
  +                return _encodings[i];
           }
  -        return DefaultLastPrintable;
  +        return new SieveEncodingInfo(encoding, DefaultLastPrintable);
       }
   
  +    static final String JIS_DANGER_CHARS
  +    = "\\\u007e\u007f\u00a2\u00a3\u00a5\u00ac"
  +    +"\u2014\u2015\u2016\u2026\u203e\u203e\u2225\u222f\u301c"
  +    +"\uff3c\uff5e\uffe0\uffe1\uffe2\uffe3";
   
       /**
  -     * Returns the last printable character for an unspecified
  -     * encoding.
  -     */
  -    static int getLastPrintable()
  -    {
  -        return DefaultLastPrintable;
  -    }
  -
  -
  -    /**
  -     * Holds information about a given encoding.
  +     * Constructs a list of all the supported encodings.
        */
  -    static final class EncodingInfo
  -    {
  -       
  +    private static final EncodingInfo[] _encodings = new EncodingInfo[] {
  +        new EncodingInfo("ASCII", 0x7F),
  +        new EncodingInfo("US-ASCII", 0x7F),
  +        new EncodingInfo("ISO-8859-1", 0xFF),
  +        new EncodingInfo("ISO-8859-2", 0xFF),
  +        new EncodingInfo("ISO-8859-3", 0xFF),
  +        new EncodingInfo("ISO-8859-4", 0xFF),
  +        new EncodingInfo("ISO-8859-5", 0xFF),
  +        new EncodingInfo("ISO-8859-6", 0xFF),
  +        new EncodingInfo("ISO-8859-7", 0xFF),
  +        new EncodingInfo("ISO-8859-8", 0xFF),
  +        new EncodingInfo("ISO-8859-9", 0xFF),
           /**
  -         * The encoding name.
  -         */ 
  -        final String name;
  -
  +         * Does JDK's converter supprt surrogates?
  +         * A Java encoding name "UTF-8" is suppoted by JDK 1.2 or later.
  +         */
  +        new EncodingInfo("UTF-8", "UTF8", 0x10FFFF),
           /**
  -         * The name used by the Java convertor.
  +         * JDK 1.1 supports "Shift_JIS" as an alias of "SJIS".
  +         * But JDK 1.2 treats "Shift_JIS" as an alias of "MS932".
  +         * The JDK 1.2's behavior is invalid against IANA registrations.
            */
  -        final String javaName;
  -
  +        new SieveEncodingInfo("Shift_JIS", "SJIS", 0x7F, JIS_DANGER_CHARS),
           /**
  -         * The last printable character.
  +         * "MS932" is supported by JDK 1.2 or later.
            */
  -        final int    lastPrintable;
  -
  -        EncodingInfo( String name, String javaName, int lastPrintable )
  -        {
  -            this.name = name;
  -            this.javaName = javaName;
  -            this.lastPrintable = lastPrintable;
  -        }
  -
  -    }
  -
  -
  -    /**
  -     * Constructs a list of all the supported encodings.
  -     */
  -    private static final EncodingInfo[] _encodings = new EncodingInfo[] {
  -        new EncodingInfo( "ASCII", "ASCII", 0x7F ),
  -        new EncodingInfo( "ISO-Latin-1", "ASCII", 0xFF ),
  -        new EncodingInfo( "ISO-8859-1", "ISO8859_1", 0xFF ),
  -        new EncodingInfo( "ISO-8859-2", "ISO8859_2", 0xFF ),
  -        new EncodingInfo( "ISO-8859-3", "ISO8859_3", 0xFF ),
  -        new EncodingInfo( "ISO-8859-4", "ISO8859_4", 0xFF ),
  -        new EncodingInfo( "ISO-8859-5", "ISO8859_5", 0xFF ),
  -        new EncodingInfo( "ISO-8859-6", "ISO8859_6", 0xFF ),
  -        new EncodingInfo( "ISO-8859-7", "ISO8859_7", 0xFF ),
  -        new EncodingInfo( "ISO-8859-8", "ISO8859_8", 0xFF ),
  -        new EncodingInfo( "ISO-8859-9", "ISO8859_9", 0xFF ),
  -        new EncodingInfo( "UTF-8", "UTF8", 0xFFFF ),
  -        new EncodingInfo( "UNICODE", "Unicode", 0xFFFF )
  +        new SieveEncodingInfo("Windows-31J", "MS932", 0x7F, JIS_DANGER_CHARS),
  +        new SieveEncodingInfo("EUC-JP", null, 0x7F, JIS_DANGER_CHARS),
  +        new SieveEncodingInfo("ISO-2022-JP", null, 0x7F, JIS_DANGER_CHARS),
       };
  -
  -
   }
  
  
  
  1.12.2.3  +2 -2      xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java
  
  Index: HTMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java,v
  retrieving revision 1.12.2.2
  retrieving revision 1.12.2.3
  diff -u -r1.12.2.2 -r1.12.2.3
  --- HTMLSerializer.java	2000/12/12 19:07:56	1.12.2.2
  +++ HTMLSerializer.java	2001/02/14 18:29:21	1.12.2.3
  @@ -116,7 +116,7 @@
    * </ul>
    *
    *
  - * @version $Revision: 1.12.2.2 $ $Date: 2000/12/12 19:07:56 $
  + * @version $Revision: 1.12.2.3 $ $Date: 2001/02/14 18:29:21 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    * @see Serializer
    */
  @@ -811,7 +811,7 @@
       }
       
       
  -    protected String getEntityRef( char ch )
  +    protected String getEntityRef(int ch)
       {
           return HTMLdtd.fromChar( ch );
       }
  
  
  
  1.8.4.3   +5 -2      xml-xerces/java/src/org/apache/xml/serialize/HTMLdtd.java
  
  Index: HTMLdtd.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/HTMLdtd.java,v
  retrieving revision 1.8.4.2
  retrieving revision 1.8.4.3
  diff -u -r1.8.4.2 -r1.8.4.3
  --- HTMLdtd.java	2000/12/12 19:07:56	1.8.4.2
  +++ HTMLdtd.java	2001/02/14 18:29:21	1.8.4.3
  @@ -81,7 +81,7 @@
    * first time any of these methods is called for fast and efficient access.
    *
    *
  - * @version $Revision: 1.8.4.2 $ $Date: 2000/12/12 19:07:56 $
  + * @version $Revision: 1.8.4.3 $ $Date: 2001/02/14 18:29:21 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    */
   public final class HTMLdtd
  @@ -353,8 +353,11 @@
        * @param value Character value of entity
        * @return Entity's name or null
        */
  -    public static String fromChar( char value )
  +    public static String fromChar(int value )
       {
  +        if (value > 0xffff)
  +            return null;
  +
           String    name;
           
           initialize();
  
  
  
  1.4.4.1   +4 -1      xml-xerces/java/src/org/apache/xml/serialize/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/Makefile,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -r1.4 -r1.4.4.1
  --- Makefile	2000/02/29 02:02:26	1.4
  +++ Makefile	2001/02/14 18:29:22	1.4.4.1
  @@ -14,7 +14,10 @@
   	ElementState.class\
   	HTMLdtd.class\
   	SerializerFactory.class\
  -	SerializerFactoryImpl.class
  +	SerializerFactoryImpl.class \
  +	EncodingInfo.class \
  +	SieveEncodingInfo.class \
  +	Encodings.class
   
   DIRS =
   
  
  
  
  1.7.2.3   +31 -7     xml-xerces/java/src/org/apache/xml/serialize/OutputFormat.java
  
  Index: OutputFormat.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/OutputFormat.java,v
  retrieving revision 1.7.2.2
  retrieving revision 1.7.2.3
  diff -u -r1.7.2.2 -r1.7.2.3
  --- OutputFormat.java	2000/12/12 19:07:57	1.7.2.2
  +++ OutputFormat.java	2001/02/14 18:29:22	1.7.2.3
  @@ -91,7 +91,7 @@
    * </ul>
    *
    *
  - * @version $Revision: 1.7.2.2 $ $Date: 2000/12/12 19:07:57 $
  + * @version $Revision: 1.7.2.3 $ $Date: 2001/02/14 18:29:22 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    *         <a href="mailto:visco@intalio.com">Keith Visco</a>
    * @see Serializer
  @@ -184,6 +184,10 @@
        */
       private String _encoding = Defaults.Encoding;
   
  +    /**
  +     * The EncodingInfo instance for _encoding.
  +     */
  +    private EncodingInfo _encodingInfo = null;
   
       /**
        * The specified media type or null.
  @@ -476,8 +480,28 @@
       public void setEncoding( String encoding )
       {
           _encoding = encoding;
  +        _encodingInfo = null;
  +    }
  +
  +    /**
  +     * Sets the encoding for this output method with an <code>EncodingInfo</code>
  +     * instance.
  +     */
  +    public void setEncoding(EncodingInfo encInfo) {
  +        _encoding = encInfo.getName();
  +        _encodingInfo = encInfo;
       }
   
  +    /**
  +     * Returns an <code>EncodingInfo<code> instance for the encoding.
  +     *
  +     * @see setEncoding
  +     */
  +    public EncodingInfo getEncodingInfo() {
  +        if (_encodingInfo == null)
  +            _encodingInfo = Encodings.getEncodingInfo(_encoding);
  +        return _encodingInfo;
  +    }
   
       /**
        * Returns the specified media type, or null.
  @@ -881,16 +905,16 @@
       {
           DocumentType doctype;
   
  -        /* XXX  Delayed until DOM Level 2 is introduced into the code base
  +           /*  DOM Level 2 was introduced into the code base*/
              doctype = doc.getDoctype();
              if ( doctype != null ) {
              // Note on catch: DOM Level 1 does not specify this method
              // and the code will throw a NoSuchMethodError
              try {
  -           return doctype.getPublicID();
  +           return doctype.getPublicId();
              } catch ( Error except ) {  }
              }
  -        */
  +        
           if ( doc instanceof HTMLDocument )
               return DTD.XHTMLPublicId;
           return null;
  @@ -905,16 +929,16 @@
       {
           DocumentType doctype;
   
  -        /* XXX  Delayed until DOM Level 2 is introduced into the code base
  +        /* DOM Level 2 was introduced into the code base*/
              doctype = doc.getDoctype();
              if ( doctype != null ) {
              // Note on catch: DOM Level 1 does not specify this method
              // and the code will throw a NoSuchMethodError
              try {
  -           return doctype.getSystemID();
  +           return doctype.getSystemId();
              } catch ( Error except ) { }
              }
  -        */
  +        
           if ( doc instanceof HTMLDocument )
               return DTD.XHTMLSystemId;
           return null;
  
  
  
  1.6.4.3   +2 -2      xml-xerces/java/src/org/apache/xml/serialize/TextSerializer.java
  
  Index: TextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/TextSerializer.java,v
  retrieving revision 1.6.4.2
  retrieving revision 1.6.4.3
  diff -u -r1.6.4.2 -r1.6.4.3
  --- TextSerializer.java	2000/12/12 19:07:57	1.6.4.2
  +++ TextSerializer.java	2001/02/14 18:29:22	1.6.4.3
  @@ -90,7 +90,7 @@
    * org.xml.sax.DocumentHandler#endDocument}.
    *
    *
  - * @version $Revision: 1.6.4.2 $ $Date: 2000/12/12 19:07:57 $
  + * @version $Revision: 1.6.4.3 $ $Date: 2001/02/14 18:29:22 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    * @see Serializer
    */
  @@ -388,7 +388,7 @@
       }
       
       
  -    protected String getEntityRef( char ch )
  +    protected String getEntityRef( int ch )
       {
           return null;
       }
  
  
  
  1.13.2.3  +2 -2      xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java
  
  Index: XMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v
  retrieving revision 1.13.2.2
  retrieving revision 1.13.2.3
  diff -u -r1.13.2.2 -r1.13.2.3
  --- XMLSerializer.java	2000/12/12 19:07:58	1.13.2.2
  +++ XMLSerializer.java	2001/02/14 18:29:23	1.13.2.3
  @@ -104,7 +104,7 @@
    * spaces at beginning of line will be stripped.
    *
    *
  - * @version $Revision: 1.13.2.2 $ $Date: 2000/12/12 19:07:58 $
  + * @version $Revision: 1.13.2.3 $ $Date: 2001/02/14 18:29:23 $
    * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
    * @see Serializer
    */
  @@ -652,7 +652,7 @@
       }
   
   
  -    protected String getEntityRef( char ch )
  +    protected String getEntityRef(int ch)
       {
           // Encode special XML characters into the equivalent character references.
           // These five are defined by default for all XML documents.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +1 -1      xml-xerces/java/src/org/apache/xml/serialize/EncodingInfo.java
  
  Index: EncodingInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/EncodingInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- EncodingInfo.java	2000/12/14 19:21:50	1.1
  +++ EncodingInfo.java	2001/02/14 18:29:21	1.1.2.1
  @@ -66,7 +66,7 @@
   /**
    * This class represents an encoding.
    *
  - * @version $Id: EncodingInfo.java,v 1.1 2000/12/14 19:21:50 lehors Exp $
  + * @version $Id: EncodingInfo.java,v 1.1.2.1 2001/02/14 18:29:21 lehors Exp $
    */
   public class EncodingInfo {
   
  
  
  
  1.1.2.1   +1 -1      xml-xerces/java/src/org/apache/xml/serialize/SieveEncodingInfo.java
  
  Index: SieveEncodingInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/SieveEncodingInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- SieveEncodingInfo.java	2000/12/14 19:21:55	1.1
  +++ SieveEncodingInfo.java	2001/02/14 18:29:22	1.1.2.1
  @@ -66,7 +66,7 @@
   /**
    * This class represents an encoding.
    *
  - * @version $Id: SieveEncodingInfo.java,v 1.1 2000/12/14 19:21:55 lehors Exp $
  + * @version $Id: SieveEncodingInfo.java,v 1.1.2.1 2001/02/14 18:29:22 lehors Exp $
    */
   public class SieveEncodingInfo extends EncodingInfo {
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +1 -1      xml-xerces/java/tests/dom/events/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/events/Makefile,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- Makefile	2000/12/12 19:08:16	1.1.2.1
  +++ Makefile	2001/02/14 18:29:25	1.1.2.2
  @@ -1,5 +1,5 @@
   
  -TARGETS= Test.class
  +TARGETS= Test.class EventReporter.class
   
   DIRS =
   
  
  
  
  1.2.2.2   +1 -50     xml-xerces/java/tests/dom/events/Test.java
  
  Index: Test.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/events/Test.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- Test.java	2000/12/12 19:08:16	1.2.2.1
  +++ Test.java	2001/02/14 18:29:26	1.2.2.2
  @@ -1,4 +1,4 @@
  -/* $Id: Test.java,v 1.2.2.1 2000/12/12 19:08:16 lehors Exp $ */
  +/* $Id: Test.java,v 1.2.2.2 2001/02/14 18:29:26 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    * 
  @@ -154,54 +154,5 @@
               t.addEventListener(evtNames[i], sharedReporter, false);
           }
   
  -    }
  -}
  -
  -class EventReporter implements EventListener
  -{
  -    boolean silent=false; // Toggle this to mask reports you don't care about
  -    int count=0;
  -    String[] phasename={"?","BUBBLING","CAPTURING","AT_TARGET","?"};
  -    
  -    public void on()
  -    {
  -        System.out.println("\nEventReporter awakened:\n");
  -        silent=false;
  -    }
  -    public void off()
  -    {
  -        System.out.println("\nEventReporter muted\n");
  -        silent=true;
  -    }
  -    
  -    public void handleEvent(Event evt)
  -    {
  -        ++count;
  -        if(silent)
  -            return;
  -            
  -        System.out.print("EVT "+count+": '"+
  -            evt.getType()+
  -            "' listener '"+((Node)evt.getCurrentTarget()).getNodeName()+
  -            "' target '"+((Node)evt.getTarget()).getNodeName()+
  -            "' while "+phasename[evt.getEventPhase()] +
  -            "... ");
  -        if(evt.getBubbles()) System.out.print("will bubble");
  -        if(evt.getCancelable()) System.out.print("can cancel");
  -        System.out.print("\n");
  -        if(evt instanceof MutationEvent)
  -        {
  -            MutationEvent me=(MutationEvent)evt;
  -            System.out.print("\t");
  -            if(me.getRelatedNode()!=null)
  -                System.out.print(" relatedNode='"+me.getRelatedNode()+"'");
  -            if(me.getAttrName()!=null)
  -                System.out.print(" attrName='"+me.getAttrName()+"'");
  -            System.out.print("\n");
  -            if(me.getPrevValue()!=null)
  -                System.out.println("\t prevValue='"+me.getPrevValue()+"'");
  -            if(me.getNewValue()!=null)
  -                System.out.println("\t newValue='"+me.getNewValue()+"'");
  -        }
       }
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +1 -1      xml-xerces/java/tests/dom/events/EventReporter.java
  
  Index: EventReporter.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/events/EventReporter.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- EventReporter.java	2001/02/08 19:25:51	1.1
  +++ EventReporter.java	2001/02/14 18:29:25	1.1.2.1
  @@ -1,4 +1,4 @@
  -/* $Id: EventReporter.java,v 1.1 2001/02/08 19:25:51 lehors Exp $ */
  +/* $Id: EventReporter.java,v 1.1.2.1 2001/02/14 18:29:25 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    * 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.2   +2 -14     xml-xerces/java/tests/dom/mem/Test.java
  
  Index: Test.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/mem/Test.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- Test.java	2000/12/12 19:08:17	1.1.4.1
  +++ Test.java	2001/02/14 18:29:27	1.1.4.2
  @@ -1,4 +1,4 @@
  -/* $Id: Test.java,v 1.1.4.1 2000/12/12 19:08:17 lehors Exp $ */
  +/* $Id: Test.java,v 1.1.4.2 2001/02/14 18:29:27 lehors Exp $ */
   /*
    * The Apache Software License, Version 1.1
    * 
  @@ -737,7 +737,7 @@
   	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
   				      new Class[]{String.class, String.class},
   				      new Object[]{"http://nsa", "<a"},
  -				      DOMException.NAMESPACE_ERR));
  +				      DOMException.INVALID_CHARACTER_ERR));
   	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
   				      new Class[]{String.class, String.class},
   				      new Object[]{"http://nsa", ":a"},
  @@ -969,10 +969,6 @@
           Assertion.equals(doc.createAttributeNS("http://nsa", "foo:a").getNamespaceURI(), "http://nsa");
           Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
   				      new Class[]{String.class, String.class},
  -				      new Object[]{"", "foo:a"},
  -				      DOMException.NAMESPACE_ERR));
  -        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
  -				      new Class[]{String.class, String.class},
   				      new Object[]{null,  "foo:a"},
   				      DOMException.NAMESPACE_ERR));
   
  @@ -1014,14 +1010,6 @@
           Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
   					   new Class[]{String.class},
   					   new Object[]{"xml"},
  -					   DOMException.NAMESPACE_ERR));
  -        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
  -					   new Class[]{String.class},
  -					   new Object[]{"foo"},
  -					   DOMException.NAMESPACE_ERR));
  -        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
  -					   new Class[]{String.class},
  -					   new Object[]{"xmlns"},
   					   DOMException.NAMESPACE_ERR));
           //Also an attribute can not have a prefix with namespaceURI == null
           attr = doc.createAttributeNS(null, "a");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.2   +2 -2      xml-xerces/java/tests/dom/range/Test.java
  
  Index: Test.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/range/Test.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- Test.java	2000/12/12 19:08:18	1.1.4.1
  +++ Test.java	2001/02/14 18:29:28	1.1.4.2
  @@ -65,7 +65,7 @@
   import org.w3c.dom.ranges.RangeException;
   
   import java.io.*;
  -import dom.DOMWriter;
  +import dom.Writer;
   import org.xml.sax.InputSource;
   
   /** This RangeTest tests all of the cases delineated as examples
  @@ -202,7 +202,7 @@
       public boolean performTest(String arg) {
           boolean passed = true;
           try {
  -            DOMWriter writer = new DOMWriter(false);
  +            Writer writer = new Writer(false);
               DOMParser parser = new DOMParser();
               if (!arg.equals("delete2") && !arg.equals("insert2")) {
               System.out.println("\n*************** Test == "+arg+" ***************");
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +0 -0      xml-xerces/java/tests/dom/range/TestCompare.java
  
  Index: TestCompare.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/range/TestCompare.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +3 -3      xml-xerces/java/tests/dom/serialize/TestSerializeDOMIn.java
  
  Index: TestSerializeDOMIn.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/serialize/TestSerializeDOMIn.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- TestSerializeDOMIn.java	2000/12/12 19:08:19	1.1.2.1
  +++ TestSerializeDOMIn.java	2001/02/14 18:29:29	1.1.2.2
  @@ -64,7 +64,7 @@
   import org.w3c.dom.Document;
   import java.io.FileInputStream;
   import org.w3c.dom.Node;
  -import dom.DOMWriter;
  +import dom.Writer;
   import dom.serialize.*;
   
   
  @@ -134,9 +134,9 @@
               }
           }
           try {
  -           DOMWriter prettyWriter = new DOMWriter( false );
  +           Writer prettyWriter = new Writer( false );
              System.out.println( "Here is the whole Document" );
  -           prettyWriter.print(  doc.getDocumentElement() );
  +           prettyWriter.write(  doc.getDocumentElement() );
           } catch( Exception ex ){
           }
       }
  
  
  
  1.1.2.2   +3 -3      xml-xerces/java/tests/dom/serialize/TestSerializeDOMOut.java
  
  Index: TestSerializeDOMOut.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/tests/dom/serialize/TestSerializeDOMOut.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- TestSerializeDOMOut.java	2000/12/12 19:08:19	1.1.2.1
  +++ TestSerializeDOMOut.java	2001/02/14 18:29:29	1.1.2.2
  @@ -65,7 +65,7 @@
   import org.w3c.dom.Document;
   import java.io.FileOutputStream;
   import org.w3c.dom.Node;
  -import dom.DOMWriter;
  +import dom.Writer;
   
   
   /**
  @@ -153,9 +153,9 @@
               TestSerializeDOMIn    tstIn  = new TestSerializeDOMIn();
               doc           = tstIn.deserializeDOM( nameOfSerializedFile );
   
  -            DOMWriter prettyWriter = new DOMWriter( false );
  +            Writer prettyWriter = new Writer( false );
               System.out.println( "Here is the whole Document" );
  -            prettyWriter.print(  doc.getDocumentElement() );
  +            prettyWriter.write(  doc.getDocumentElement() );
           } catch ( Exception ex ){
               ex.printStackTrace();
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +1218 -569 xml-xerces/java/tools/ant.jar
  
  	<<Binary file>>
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +0 -0      xml-xerces/java/tools/junit.jar
  
  	<<Binary file>>
  
  
  1.1.2.1   +0 -0      xml-xerces/java/tools/optional.jar
  
  	<<Binary file>>