KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > apache > html > dom > HTMLDocumentImpl


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 1999,2000 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Xerces" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 1999, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57 package org.enhydra.apache.html.dom;
58
59
60 import java.io.StringWriter JavaDoc;
61 import java.lang.reflect.Constructor JavaDoc;
62 import java.util.Hashtable JavaDoc;
63
64 import org.enhydra.apache.xerces.dom.DocumentImpl;
65 import org.enhydra.apache.xerces.dom.NodeImpl;
66 import org.w3c.dom.Attr JavaDoc;
67 import org.w3c.dom.DOMException JavaDoc;
68 import org.w3c.dom.Element JavaDoc;
69 import org.w3c.dom.Node JavaDoc;
70 import org.w3c.dom.NodeList JavaDoc;
71 import org.w3c.dom.html.HTMLCollection;
72 import org.w3c.dom.html.HTMLDocument;
73 import org.w3c.dom.html.HTMLElement;
74 import org.w3c.dom.html.HTMLTitleElement;
75
76
77 /**
78  * Implements an HTML document. Provides access to the top level element in the
79  * document, its body and title.
80  * <P>
81  * Several methods create new nodes of all basic types (comment, text, element,
82  * etc.). These methods create new nodes but do not place them in the document
83  * tree. The nodes may be placed in the document tree using {@link
84  * org.w3c.dom.Node#appendChild} or {@link org.w3c.dom.Node#insertBefore}, or
85  * they may be placed in some other document tree.
86  * <P>
87  * Note: &lt;FRAMESET&gt; documents are not supported at the moment, neither
88  * are direct document writing ({@link #open}, {@link #write}) and HTTP attribute
89  * methods ({@link #getURL}, {@link #getCookie}).
90  *
91  *
92  * @version $Revision: 1.2 $ $Date: 2005/01/26 08:28:44 $
93  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
94  * @see org.w3c.dom.html.HTMLDocument
95  */

96 public class HTMLDocumentImpl
97     extends DocumentImpl
98     implements HTMLDocument
99 {
100
101
102     /**
103      * Holds {@link HTMLCollectionImpl} object with live collection of all
104      * anchors in document. This reference is on demand only once.
105      */

106     private HTMLCollectionImpl _anchors;
107
108
109     /**
110      * Holds {@link HTMLCollectionImpl} object with live collection of all
111      * forms in document. This reference is on demand only once.
112      */

113     private HTMLCollectionImpl _forms;
114
115
116     /**
117      * Holds {@link HTMLCollectionImpl} object with live collection of all
118      * images in document. This reference is on demand only once.
119      */

120     private HTMLCollectionImpl _images;
121
122
123     /**
124      * Holds {@link HTMLCollectionImpl} object with live collection of all
125      * links in document. This reference is on demand only once.
126      */

127     private HTMLCollectionImpl _links;
128
129
130     /**
131      * Holds {@link HTMLCollectionImpl} object with live collection of all
132      * applets in document. This reference is on demand only once.
133      */

134     private HTMLCollectionImpl _applets;
135
136
137     /**
138      * Holds string writer used by direct manipulation operation ({@link #open}.
139      * {@link #write}, etc) to write new contents into the document and parse
140      * that text into a document tree.
141      */

142     private StringWriter JavaDoc _writer;
143
144
145     /**
146      * Holds names and classes of HTML element types. When an element with a
147      * particular tag name is created, the matching {@link java.lang.Class}
148      * is used to create the element object. For example, &lt;A&gt; matches
149      * {@link HTMLAnchorElementImpl}. This static table is shared across all
150      * HTML documents.
151      *
152      * @see #createElement
153      */

154     private static Hashtable JavaDoc _elementTypesHTML;
155
156
157     /**
158      * Signature used to locate constructor of HTML element classes. This
159      * static array is shared across all HTML documents.
160      *
161      * @see #createElement
162      */

163     private static final Class JavaDoc[] _elemClassSigHTML =
164                 new Class JavaDoc[] { HTMLDocumentImpl.class, String JavaDoc.class };
165
166
167     /**
168      */

169     public HTMLDocumentImpl()
170     {
171         super();
172         populateElementTypes();
173     }
174
175     /**
176      * Find the direct child element of a node given its name.
177      */

178     private Node JavaDoc getDirectChildElement(String JavaDoc name,
179                                        Node JavaDoc root) {
180         for (Node JavaDoc child = root.getFirstChild(); child != null;
181              child = child.getNextSibling()) {
182             if (child.getNodeName().equals(name)) {
183                 return child;
184             }
185         }
186         return null;
187     }
188
189
190     public synchronized Element JavaDoc getDocumentElement() {
191         // Enhydra modified: Original Xerces code tried to reorder nodes to
192
// make things right, which moved around comments to weird locations.
193
// Throwing an error would be more appropriate, but we were afraid of
194
// breaking existing code, so just get the node.
195

196         Element JavaDoc html = (Element JavaDoc)getDirectChildElement("HTML", this);
197         if (html == null) {
198             // Create, HTML element must exist as a child of the document.
199
html = new HTMLHtmlElementImpl(this, "HTML");
200             appendChild(html);
201         }
202         return html;
203     }
204     
205     /**
206      * Obtains the &lt;HEAD&gt; element in the document, creating one if does
207      * not exist before. The &lt;HEAD&gt; element is the first element in the
208      * &lt;HTML&gt; in the document. The &lt;HTML&gt; element is obtained by
209      * calling {@link #getDocumentElement}. If the element does not exist, one
210      * is created.
211      * <P>
212      * Called by {@link #getTitle}, {@link #setTitle}, {@link #getBody} and
213      * {@link #setBody} to assure the document has the &lt;HEAD&gt; element
214      * correctly placed.
215      *
216      * @return The &lt;HEAD&gt; element
217      */

218     public synchronized HTMLElement getHead() {
219         // Enhydra modified: Original Xerces code tried to reorder nodes to
220
// make things right, which moved around comments to weird locations.
221
// Throwing an error would be more appropriate, but we were afraid of
222
// breaking existing code, so just get the node.
223

224         // Search for HEAD under HTML element.
225
Element JavaDoc html = getDocumentElement();
226         HTMLElement head
227             = (HTMLElement)getDirectChildElement("HEAD", html);
228         if (head == null) {
229             // Head does not exist, create a new one.
230
head = new HTMLHeadElementImpl(this, "HEAD");
231             html.insertBefore(head, html.getFirstChild());
232         }
233         return head;
234     }
235
236     public synchronized String JavaDoc getTitle() {
237         // Enhydra modified: Original Xerces code is some what strange, it
238
// called getElementsByTagName() twice, but only used the second
239
// result. We assume it' a direct child of HEAD (although more
240
// error checking might be better).
241

242         HTMLTitleElement title
243             = (HTMLTitleElement)getDirectChildElement("TITLE", getHead());
244         if (title == null) {
245             return ""; // No TITLE found, return an empty string.
246
} else {
247             return title.getText();
248         }
249     }
250
251
252     public synchronized void setTitle(String JavaDoc newTitle) {
253         // Enhydra modified: Original Xerces code used getElementsByTagName()
254
// to find the title. We assume it' a direct child of HEAD (although
255
// more error checking might be better).
256

257         HTMLElement head = getHead();
258         HTMLTitleElement title
259             = (HTMLTitleElement)getDirectChildElement("TITLE", head);
260         if (title == null) {
261             title = new HTMLTitleElementImpl(this, "TITLE");
262         }
263         title.setText(newTitle);
264     }
265
266     /**
267      * Find a BODY or FRAMESET element.
268      */

269     private HTMLElement findBody(Element JavaDoc html) {
270         HTMLElement body = (HTMLElement)getDirectChildElement("BODY", html);
271         if (body == null) {
272             body = (HTMLElement)getDirectChildElement("FRAMESET", html);
273         }
274         return body;
275     }
276
277     public synchronized HTMLElement getBody() {
278         // Enhydra modified: Original Xerces code tried to reorder nodes to
279
// make things right, which moved around comments to weird locations.
280
// Throwing an error would be more appropriate, but we were afraid of
281
// breaking existing code, so just get the node.
282

283         // Find BODY or FRAMESET
284
Element JavaDoc html = getDocumentElement();
285         HTMLElement body = findBody(html);
286         if (body == null) {
287             // Create new body, and place it a the end of the HTML element.
288
body = new HTMLBodyElementImpl(this, "BODY");
289             html.appendChild(body);
290         }
291         return body;
292     }
293
294
295     public synchronized void setBody(HTMLElement newBody) {
296         // Enhydra modified: Original Xerces code tried to reorder nodes to
297
// make things right, which moved around comments to weird locations.
298
// Throwing an error would be more appropriate, but we were afraid of
299
// breaking existing code, so just get the node.
300

301         // Find BODY or FRAMESET
302
Element JavaDoc html = getDocumentElement();
303         HTMLElement body = findBody(html);
304         if (body == null) {
305             html.appendChild(newBody);
306         } else {
307             html.replaceChild(newBody, body);
308         }
309     }
310
311
312     public synchronized Element JavaDoc getElementById( String JavaDoc elementId )
313     {
314         return getElementById( elementId, this );
315     }
316
317
318     public NodeList JavaDoc getElementsByName( String JavaDoc elementName )
319     {
320         return new NameNodeListImpl( this, elementName );
321     }
322
323
324     public final NodeList JavaDoc getElementsByTagName( String JavaDoc tagName )
325     {
326         return super.getElementsByTagName( tagName.toUpperCase() );
327     }
328
329
330     public final NodeList JavaDoc getElementsByTagNameNS( String JavaDoc namespaceURI,
331                                                   String JavaDoc localName )
332     {
333         if ( namespaceURI != null && namespaceURI.length() > 0 )
334             return super.getElementsByTagNameNS( namespaceURI, localName.toUpperCase() );
335         else
336             return super.getElementsByTagName( localName.toUpperCase() );
337     }
338
339
340     public Element JavaDoc createElementNS( String JavaDoc namespaceURI, String JavaDoc qualifiedName )
341     {
342         if ( namespaceURI == null || namespaceURI.length() == 0 )
343             return createElement( qualifiedName );
344         else
345             return super.createElementNS( namespaceURI, qualifiedName );
346     }
347
348
349     public Element JavaDoc createElement( String JavaDoc tagName )
350         throws DOMException JavaDoc
351     {
352         Class JavaDoc elemClass;
353         Constructor JavaDoc cnst;
354
355         // First, make sure tag name is all upper case, next get the associated
356
// element class. If no class is found, generate a generic HTML element.
357
// Do so also if an unexpected exception occurs.
358
tagName = tagName.toUpperCase();
359         elemClass = (Class JavaDoc) _elementTypesHTML.get( tagName );
360         if ( elemClass != null )
361         {
362             // Get the constructor for the element. The signature specifies an
363
// owner document and a tag name. Use the constructor to instantiate
364
// a new object and return it.
365
try
366             {
367                 cnst = elemClass.getConstructor( _elemClassSigHTML );
368                 return (Element JavaDoc) cnst.newInstance( new Object JavaDoc[] { this, tagName } );
369             }
370             catch ( Exception JavaDoc except )
371             {
372                 Throwable JavaDoc thrw;
373
374                 if ( except instanceof java.lang.reflect.InvocationTargetException JavaDoc )
375                     thrw = ( (java.lang.reflect.InvocationTargetException JavaDoc) except ).getTargetException();
376                 else
377                     thrw = except;
378 // System.out.println( "Exception " + thrw.getClass().getName() );
379
// System.out.println( thrw.getMessage() );
380

381                 throw new IllegalStateException JavaDoc( "HTM15 Tag '" + tagName + "' associated with an Element class that failed to construct.\n" + tagName);
382             }
383         }
384         return new HTMLElementImpl( this, tagName );
385     }
386
387
388     /**
389      * Creates an Attribute having this Document as its OwnerDoc.
390      * Overrides {@link DocumentImpl#createAttribute} and returns
391      * and attribute whose name is lower case.
392      *
393      * @param name The name of the attribute
394      * @return An attribute whose name is all lower case
395      * @throws DOMException(INVALID_NAME_ERR) if the attribute name
396      * is not acceptable
397      */

398     public Attr JavaDoc createAttribute( String JavaDoc name )
399         throws DOMException JavaDoc
400     {
401         return super.createAttribute( name.toLowerCase() );
402     }
403
404
405     public String JavaDoc getReferrer()
406     {
407         // Information not available on server side.
408
return null;
409     }
410
411
412     public String JavaDoc getDomain()
413     {
414         // Information not available on server side.
415
return null;
416     }
417
418
419     public String JavaDoc getURL()
420     {
421         // Information not available on server side.
422
return null;
423     }
424
425
426     public String JavaDoc getCookie()
427     {
428         // Information not available on server side.
429
return null;
430     }
431
432
433     public void setCookie( String JavaDoc cookie )
434     {
435         // Information not available on server side.
436
}
437
438
439     public HTMLCollection getImages()
440     {
441         // For more information see HTMLCollection#collectionMatch
442
if ( _images == null )
443             _images = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.IMAGE );
444         return _images;
445     }
446
447
448     public HTMLCollection getApplets()
449     {
450         // For more information see HTMLCollection#collectionMatch
451
if ( _applets == null )
452             _applets = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.APPLET );
453         return _applets;
454     }
455
456
457     public HTMLCollection getLinks()
458     {
459         // For more information see HTMLCollection#collectionMatch
460
if ( _links == null )
461             _links = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.LINK );
462         return _links;
463     }
464
465
466     public HTMLCollection getForms()
467     {
468         // For more information see HTMLCollection#collectionMatch
469
if ( _forms == null )
470             _forms = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.FORM );
471         return _forms;
472     }
473
474
475     public HTMLCollection getAnchors()
476     {
477         // For more information see HTMLCollection#collectionMatch
478
if ( _anchors == null )
479             _anchors = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.ANCHOR );
480         return _anchors;
481     }
482
483
484     public void open()
485     {
486         // When called an in-memory is prepared. The document tree is still
487
// accessible the old way, until this writer is closed.
488
if ( _writer == null )
489             _writer = new StringWriter JavaDoc();
490     }
491
492
493     public void close()
494     {
495         // ! NOT IMPLEMENTED, REQUIRES PARSER !
496
if ( _writer != null )
497         {
498             _writer = null;
499         }
500     }
501
502
503     public void write( String JavaDoc text )
504     {
505         // Write a string into the in-memory writer.
506
if ( _writer != null )
507             _writer.write( text );
508     }
509
510
511     public void writeln( String JavaDoc text )
512     {
513         // Write a line into the in-memory writer.
514
if ( _writer != null )
515             _writer.write( text + "\n" );
516     }
517
518
519     public Node JavaDoc cloneNode( boolean deep )
520     {
521         HTMLDocumentImpl clone;
522         NodeImpl node;
523         
524         clone = new HTMLDocumentImpl();
525         if ( deep ) {
526             node = (NodeImpl) getFirstChild();
527             while ( node != null ) {
528                 clone.appendChild( clone.importNode( node, true ) );
529                 node = (NodeImpl) node.getNextSibling();
530             }
531         }
532         return clone;
533     }
534
535
536     /**
537      * Recursive method retreives an element by its <code>id</code> attribute.
538      * Called by {@link #getElementById(String)}.
539      *
540      * @param elementId The <code>id</code> value to look for
541      * @return The node in which to look for
542      */

543     private Element JavaDoc getElementById( String JavaDoc elementId, Node JavaDoc node )
544     {
545         Node JavaDoc child;
546         Element JavaDoc result;
547
548         child = node.getFirstChild();
549         while ( child != null )
550         {
551             if ( child instanceof Element JavaDoc )
552             {
553                 if ( elementId.equals( ( (Element JavaDoc) child ).getAttribute( "id" ) ) )
554                     return (Element JavaDoc) child;
555                 result = getElementById( elementId, child );
556                 if ( result != null )
557                     return result;
558             }
559             child = child.getNextSibling();
560         }
561         return null;
562     }
563
564
565     /**
566      * Called by the constructor to populate the element types list (see {@link
567      * #_elementTypesHTML}). Will be called multiple times but populate the list
568      * only the first time. Replacement for static constructor.
569      */

570     private static void populateElementTypes()
571     {
572         // This class looks like it is due to some strange
573
// (read: inconsistent) JVM bugs.
574
// Initially all this code was placed in the static constructor,
575
// but that caused some early JVMs (1.1) to go mad, and if a
576
// class could not be found (as happened during development),
577
// the JVM would die.
578
// Bertrand Delacretaz <bdelacretaz@worldcom.ch> pointed out
579
// several configurations where HTMLAnchorElementImpl.class
580
// failed, forcing me to revert back to Class.forName().
581

582         if ( _elementTypesHTML != null )
583             return;
584         _elementTypesHTML = new Hashtable JavaDoc( 63 );
585         populateElementType( "A", "HTMLAnchorElementImpl" );
586         populateElementType( "APPLET", "HTMLAppletElementImpl" );
587         populateElementType( "AREA", "HTMLAreaElementImpl" );
588         populateElementType( "BASE", "HTMLBaseElementImpl" );
589         populateElementType( "BASEFONT", "HTMLBaseFontElementImpl" );
590         populateElementType( "BLOCKQUOTE", "HTMLQuoteElementImpl" );
591         populateElementType( "BODY", "HTMLBodyElementImpl" );
592         populateElementType( "BR", "HTMLBRElementImpl" );
593         populateElementType( "BUTTON", "HTMLButtonElementImpl" );
594         populateElementType( "DEL", "HTMLModElementImpl" );
595         populateElementType( "DIR", "HTMLDirectoryElementImpl" );
596         populateElementType( "DIV", "HTMLDivElementImpl" );
597         populateElementType( "DL", "HTMLDListElementImpl" );
598         populateElementType( "FIELDSET", "HTMLFieldSetElementImpl" );
599         populateElementType( "FONT", "HTMLFontElementImpl" );
600         populateElementType( "FORM", "HTMLFormElementImpl" );
601         populateElementType( "FRAME","HTMLFrameElementImpl" );
602         populateElementType( "FRAMESET", "HTMLFrameSetElementImpl" );
603         populateElementType( "HEAD", "HTMLHeadElementImpl" );
604         populateElementType( "H1", "HTMLHeadingElementImpl" );
605         populateElementType( "H2", "HTMLHeadingElementImpl" );
606         populateElementType( "H3", "HTMLHeadingElementImpl" );
607         populateElementType( "H4", "HTMLHeadingElementImpl" );
608         populateElementType( "H5", "HTMLHeadingElementImpl" );
609         populateElementType( "H6", "HTMLHeadingElementImpl" );
610         populateElementType( "HR", "HTMLHRElementImpl" );
611         populateElementType( "HTML", "HTMLHtmlElementImpl" );
612         populateElementType( "IFRAME", "HTMLIFrameElementImpl" );
613         populateElementType( "IMG", "HTMLImageElementImpl" );
614         populateElementType( "INPUT", "HTMLInputElementImpl" );
615         populateElementType( "INS", "HTMLModElementImpl" );
616         populateElementType( "ISINDEX", "HTMLIsIndexElementImpl" );
617         populateElementType( "LABEL", "HTMLLabelElementImpl" );
618         populateElementType( "LEGEND", "HTMLLegendElementImpl" );
619         populateElementType( "LI", "HTMLLIElementImpl" );
620         populateElementType( "LINK", "HTMLLinkElementImpl" );
621         populateElementType( "MAP", "HTMLMapElementImpl" );
622         populateElementType( "MENU", "HTMLMenuElementImpl" );
623         populateElementType( "META", "HTMLMetaElementImpl" );
624         populateElementType( "OBJECT", "HTMLObjectElementImpl" );
625         populateElementType( "OL", "HTMLOListElementImpl" );
626         populateElementType( "OPTGROUP", "HTMLOptGroupElementImpl" );
627         populateElementType( "OPTION", "HTMLOptionElementImpl" );
628         populateElementType( "P", "HTMLParagraphElementImpl" );
629         populateElementType( "PARAM", "HTMLParamElementImpl" );
630         populateElementType( "PRE", "HTMLPreElementImpl" );
631         populateElementType( "Q", "HTMLQuoteElementImpl" );
632         populateElementType( "SCRIPT", "HTMLScriptElementImpl" );
633         populateElementType( "SELECT", "HTMLSelectElementImpl" );
634         populateElementType( "STYLE", "HTMLStyleElementImpl" );
635         populateElementType( "TABLE", "HTMLTableElementImpl" );
636         populateElementType( "CAPTION", "HTMLTableCaptionElementImpl" );
637         populateElementType( "TD", "HTMLTableCellElementImpl" );
638         populateElementType( "TH", "HTMLTableCellElementImpl" );
639         populateElementType( "COL", "HTMLTableColElementImpl" );
640         populateElementType( "COLGROUP", "HTMLTableColElementImpl" );
641         populateElementType( "TR", "HTMLTableRowElementImpl" );
642         populateElementType( "TBODY", "HTMLTableSectionElementImpl" );
643         populateElementType( "THEAD", "HTMLTableSectionElementImpl" );
644         populateElementType( "TFOOT", "HTMLTableSectionElementImpl" );
645         populateElementType( "TEXTAREA", "HTMLTextAreaElementImpl" );
646         populateElementType( "TITLE", "HTMLTitleElementImpl" );
647         populateElementType( "UL", "HTMLUListElementImpl" );
648     }
649     
650     
651     private static void populateElementType( String JavaDoc tagName, String JavaDoc className )
652     {
653         try {
654             _elementTypesHTML.put( tagName, Class.forName( "org.enhydra.apache.html.dom." + className ) );
655         } catch ( ClassNotFoundException JavaDoc except ) {
656             new RuntimeException JavaDoc( "HTM019 OpenXML Error: Could not find class " + className + " implementing HTML element " + tagName
657                                   + "\n" + className + "\t" + tagName);
658         }
659     }
660
661
662 }
663
664
Popular Tags