xercesimpl

16:54:58.255 INFO  jd.cli.Main - Decompiling xercesimpl.jar
package org.apache.html.dom;

class CollectionIndex
{
  private int _index;
  
  int getIndex()
  {
    return _index;
  }
  
  void decrement()
  {
    _index -= 1;
  }
  
  boolean isZero()
  {
    return _index <= 0;
  }
  
  CollectionIndex(int paramInt)
  {
    _index = paramInt;
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.CollectionIndex
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLAnchorElement;

public class HTMLAnchorElementImpl
  extends HTMLElementImpl
  implements HTMLAnchorElement
{
  private static final long serialVersionUID = -140558580924061847L;
  
  public String getAccessKey()
  {
    String str = getAttribute("accesskey");
    if ((str != null) && (str.length() > 1)) {
      str = str.substring(0, 1);
    }
    return str;
  }
  
  public void setAccessKey(String paramString)
  {
    if ((paramString != null) && (paramString.length() > 1)) {
      paramString = paramString.substring(0, 1);
    }
    setAttribute("accesskey", paramString);
  }
  
  public String getCharset()
  {
    return getAttribute("charset");
  }
  
  public void setCharset(String paramString)
  {
    setAttribute("charset", paramString);
  }
  
  public String getCoords()
  {
    return getAttribute("coords");
  }
  
  public void setCoords(String paramString)
  {
    setAttribute("coords", paramString);
  }
  
  public String getHref()
  {
    return getAttribute("href");
  }
  
  public void setHref(String paramString)
  {
    setAttribute("href", paramString);
  }
  
  public String getHreflang()
  {
    return getAttribute("hreflang");
  }
  
  public void setHreflang(String paramString)
  {
    setAttribute("hreflang", paramString);
  }
  
  public String getName()
  {
    return getAttribute("name");
  }
  
  public void setName(String paramString)
  {
    setAttribute("name", paramString);
  }
  
  public String getRel()
  {
    return getAttribute("rel");
  }
  
  public void setRel(String paramString)
  {
    setAttribute("rel", paramString);
  }
  
  public String getRev()
  {
    return getAttribute("rev");
  }
  
  public void setRev(String paramString)
  {
    setAttribute("rev", paramString);
  }
  
  public String getShape()
  {
    return capitalize(getAttribute("shape"));
  }
  
  public void setShape(String paramString)
  {
    setAttribute("shape", paramString);
  }
  
  public int getTabIndex()
  {
    return getInteger(getAttribute("tabindex"));
  }
  
  public void setTabIndex(int paramInt)
  {
    setAttribute("tabindex", String.valueOf(paramInt));
  }
  
  public String getTarget()
  {
    return getAttribute("target");
  }
  
  public void setTarget(String paramString)
  {
    setAttribute("target", paramString);
  }
  
  public String getType()
  {
    return getAttribute("type");
  }
  
  public void setType(String paramString)
  {
    setAttribute("type", paramString);
  }
  
  public void blur() {}
  
  public void focus() {}
  
  public HTMLAnchorElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLAnchorElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLAppletElement;

public class HTMLAppletElementImpl
  extends HTMLElementImpl
  implements HTMLAppletElement
{
  private static final long serialVersionUID = 8375794094117740967L;
  
  public String getAlign()
  {
    return getAttribute("align");
  }
  
  public void setAlign(String paramString)
  {
    setAttribute("align", paramString);
  }
  
  public String getAlt()
  {
    return getAttribute("alt");
  }
  
  public void setAlt(String paramString)
  {
    setAttribute("alt", paramString);
  }
  
  public String getArchive()
  {
    return getAttribute("archive");
  }
  
  public void setArchive(String paramString)
  {
    setAttribute("archive", paramString);
  }
  
  public String getCode()
  {
    return getAttribute("code");
  }
  
  public void setCode(String paramString)
  {
    setAttribute("code", paramString);
  }
  
  public String getCodeBase()
  {
    return getAttribute("codebase");
  }
  
  public void setCodeBase(String paramString)
  {
    setAttribute("codebase", paramString);
  }
  
  public String getHeight()
  {
    return getAttribute("height");
  }
  
  public void setHeight(String paramString)
  {
    setAttribute("height", paramString);
  }
  
  public String getHspace()
  {
    return getAttribute("height");
  }
  
  public void setHspace(String paramString)
  {
    setAttribute("height", paramString);
  }
  
  public String getName()
  {
    return getAttribute("name");
  }
  
  public void setName(String paramString)
  {
    setAttribute("name", paramString);
  }
  
  public String getObject()
  {
    return getAttribute("object");
  }
  
  public void setObject(String paramString)
  {
    setAttribute("object", paramString);
  }
  
  public String getVspace()
  {
    return getAttribute("vspace");
  }
  
  public void setVspace(String paramString)
  {
    setAttribute("vspace", paramString);
  }
  
  public String getWidth()
  {
    return getAttribute("width");
  }
  
  public void setWidth(String paramString)
  {
    setAttribute("width", paramString);
  }
  
  public HTMLAppletElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLAppletElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLAreaElement;

public class HTMLAreaElementImpl
  extends HTMLElementImpl
  implements HTMLAreaElement
{
  private static final long serialVersionUID = 7164004431531608995L;
  
  public String getAccessKey()
  {
    String str = getAttribute("accesskey");
    if ((str != null) && (str.length() > 1)) {
      str = str.substring(0, 1);
    }
    return str;
  }
  
  public void setAccessKey(String paramString)
  {
    if ((paramString != null) && (paramString.length() > 1)) {
      paramString = paramString.substring(0, 1);
    }
    setAttribute("accesskey", paramString);
  }
  
  public String getAlt()
  {
    return getAttribute("alt");
  }
  
  public void setAlt(String paramString)
  {
    setAttribute("alt", paramString);
  }
  
  public String getCoords()
  {
    return getAttribute("coords");
  }
  
  public void setCoords(String paramString)
  {
    setAttribute("coords", paramString);
  }
  
  public String getHref()
  {
    return getAttribute("href");
  }
  
  public void setHref(String paramString)
  {
    setAttribute("href", paramString);
  }
  
  public boolean getNoHref()
  {
    return getBinary("nohref");
  }
  
  public void setNoHref(boolean paramBoolean)
  {
    setAttribute("nohref", paramBoolean);
  }
  
  public String getShape()
  {
    return capitalize(getAttribute("shape"));
  }
  
  public void setShape(String paramString)
  {
    setAttribute("shape", paramString);
  }
  
  public int getTabIndex()
  {
    return getInteger(getAttribute("tabindex"));
  }
  
  public void setTabIndex(int paramInt)
  {
    setAttribute("tabindex", String.valueOf(paramInt));
  }
  
  public String getTarget()
  {
    return getAttribute("target");
  }
  
  public void setTarget(String paramString)
  {
    setAttribute("target", paramString);
  }
  
  public HTMLAreaElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLAreaElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLBRElement;

public class HTMLBRElementImpl
  extends HTMLElementImpl
  implements HTMLBRElement
{
  private static final long serialVersionUID = 311960206282154750L;
  
  public String getClear()
  {
    return capitalize(getAttribute("clear"));
  }
  
  public void setClear(String paramString)
  {
    setAttribute("clear", paramString);
  }
  
  public HTMLBRElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLBRElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLBaseElement;

public class HTMLBaseElementImpl
  extends HTMLElementImpl
  implements HTMLBaseElement
{
  private static final long serialVersionUID = -396648580810072153L;
  
  public String getHref()
  {
    return getAttribute("href");
  }
  
  public void setHref(String paramString)
  {
    setAttribute("href", paramString);
  }
  
  public String getTarget()
  {
    return getAttribute("target");
  }
  
  public void setTarget(String paramString)
  {
    setAttribute("target", paramString);
  }
  
  public HTMLBaseElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLBaseElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLBaseFontElement;

public class HTMLBaseFontElementImpl
  extends HTMLElementImpl
  implements HTMLBaseFontElement
{
  private static final long serialVersionUID = -3650249921091097229L;
  
  public String getColor()
  {
    return capitalize(getAttribute("color"));
  }
  
  public void setColor(String paramString)
  {
    setAttribute("color", paramString);
  }
  
  public String getFace()
  {
    return capitalize(getAttribute("face"));
  }
  
  public void setFace(String paramString)
  {
    setAttribute("face", paramString);
  }
  
  public String getSize()
  {
    return getAttribute("size");
  }
  
  public void setSize(String paramString)
  {
    setAttribute("size", paramString);
  }
  
  public HTMLBaseFontElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLBaseFontElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLBodyElement;

public class HTMLBodyElementImpl
  extends HTMLElementImpl
  implements HTMLBodyElement
{
  private static final long serialVersionUID = 9058852459426595202L;
  
  public String getALink()
  {
    return getAttribute("alink");
  }
  
  public void setALink(String paramString)
  {
    setAttribute("alink", paramString);
  }
  
  public String getBackground()
  {
    return getAttribute("background");
  }
  
  public void setBackground(String paramString)
  {
    setAttribute("background", paramString);
  }
  
  public String getBgColor()
  {
    return getAttribute("bgcolor");
  }
  
  public void setBgColor(String paramString)
  {
    setAttribute("bgcolor", paramString);
  }
  
  public String getLink()
  {
    return getAttribute("link");
  }
  
  public void setLink(String paramString)
  {
    setAttribute("link", paramString);
  }
  
  public String getText()
  {
    return getAttribute("text");
  }
  
  public void setText(String paramString)
  {
    setAttribute("text", paramString);
  }
  
  public String getVLink()
  {
    return getAttribute("vlink");
  }
  
  public void setVLink(String paramString)
  {
    setAttribute("vlink", paramString);
  }
  
  public HTMLBodyElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLBodyElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import java.util.Vector;
import org.apache.xerces.dom.ElementImpl;
import org.apache.xerces.dom.ProcessingInstructionImpl;
import org.w3c.dom.Node;
import org.w3c.dom.html.HTMLDocument;
import org.xml.sax.AttributeList;
import org.xml.sax.DocumentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;

public class HTMLBuilder
  implements DocumentHandler
{
  protected HTMLDocumentImpl _document;
  protected ElementImpl _current;
  private boolean _ignoreWhitespace = true;
  private boolean _done = true;
  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 paramString, AttributeList paramAttributeList)
    throws SAXException
  {
    if (paramString == null) {
      throw new SAXException("HTM004 Argument 'tagName' is null.");
    }
    ElementImpl localElementImpl;
    int i;
    if (_document == null)
    {
      _document = new HTMLDocumentImpl();
      localElementImpl = (ElementImpl)_document.getDocumentElement();
      _current = localElementImpl;
      if (_current == null) {
        throw new SAXException("HTM005 State error: Document.getDocumentElement returns null.");
      }
      if (_preRootNodes != null)
      {
        i = _preRootNodes.size();
        while (i-- > 0) {
          _document.insertBefore((Node)_preRootNodes.elementAt(i), localElementImpl);
        }
        _preRootNodes = null;
      }
    }
    else
    {
      if (_current == null) {
        throw new SAXException("HTM006 State error: startElement called after end of document element.");
      }
      localElementImpl = (ElementImpl)_document.createElement(paramString);
      _current.appendChild(localElementImpl);
      _current = localElementImpl;
    }
    if (paramAttributeList != null) {
      for (i = 0; i < paramAttributeList.getLength(); i++) {
        localElementImpl.setAttribute(paramAttributeList.getName(i), paramAttributeList.getValue(i));
      }
    }
  }
  
  public void endElement(String paramString)
    throws SAXException
  {
    if (_current == null) {
      throw new SAXException("HTM007 State error: endElement called with no current node.");
    }
    if (!_current.getNodeName().equalsIgnoreCase(paramString)) {
      throw new SAXException("HTM008 State error: mismatch in closing tag name " + paramString + "\n" + paramString);
    }
    if (_current.getParentNode() == _current.getOwnerDocument()) {
      _current = null;
    } else {
      _current = ((ElementImpl)_current.getParentNode());
    }
  }
  
  public void characters(String paramString)
    throws SAXException
  {
    if (_current == null) {
      throw new SAXException("HTM009 State error: character data found outside of root element.");
    }
    _current.appendChild(_document.createTextNode(paramString));
  }
  
  public void characters(char[] paramArrayOfChar, int paramInt1, int paramInt2)
    throws SAXException
  {
    if (_current == null) {
      throw new SAXException("HTM010 State error: character data found outside of root element.");
    }
    _current.appendChild(_document.createTextNode(new String(paramArrayOfChar, paramInt1, paramInt2)));
  }
  
  public void ignorableWhitespace(char[] paramArrayOfChar, int paramInt1, int paramInt2)
    throws SAXException
  {
    if (!_ignoreWhitespace) {
      _current.appendChild(_document.createTextNode(new String(paramArrayOfChar, paramInt1, paramInt2)));
    }
  }
  
  public void processingInstruction(String paramString1, String paramString2)
    throws SAXException
  {
    if ((_current == null) && (_document == null))
    {
      if (_preRootNodes == null) {
        _preRootNodes = new Vector();
      }
      _preRootNodes.addElement(new ProcessingInstructionImpl(null, paramString1, paramString2));
    }
    else if ((_current == null) && (_document != null))
    {
      _document.appendChild(_document.createProcessingInstruction(paramString1, paramString2));
    }
    else
    {
      _current.appendChild(_document.createProcessingInstruction(paramString1, paramString2));
    }
  }
  
  public HTMLDocument getHTMLDocument()
  {
    return _document;
  }
  
  public void setDocumentLocator(Locator paramLocator) {}
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLBuilder
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLButtonElement;

public class HTMLButtonElementImpl
  extends HTMLElementImpl
  implements HTMLButtonElement, HTMLFormControl
{
  private static final long serialVersionUID = -753685852948076730L;
  
  public String getAccessKey()
  {
    String str = getAttribute("accesskey");
    if ((str != null) && (str.length() > 1)) {
      str = str.substring(0, 1);
    }
    return str;
  }
  
  public void setAccessKey(String paramString)
  {
    if ((paramString != null) && (paramString.length() > 1)) {
      paramString = paramString.substring(0, 1);
    }
    setAttribute("accesskey", paramString);
  }
  
  public boolean getDisabled()
  {
    return getBinary("disabled");
  }
  
  public void setDisabled(boolean paramBoolean)
  {
    setAttribute("disabled", paramBoolean);
  }
  
  public String getName()
  {
    return getAttribute("name");
  }
  
  public void setName(String paramString)
  {
    setAttribute("name", paramString);
  }
  
  public int getTabIndex()
  {
    try
    {
      return Integer.parseInt(getAttribute("tabindex"));
    }
    catch (NumberFormatException localNumberFormatException) {}
    return 0;
  }
  
  public void setTabIndex(int paramInt)
  {
    setAttribute("tabindex", String.valueOf(paramInt));
  }
  
  public String getType()
  {
    return capitalize(getAttribute("type"));
  }
  
  public String getValue()
  {
    return getAttribute("value");
  }
  
  public void setValue(String paramString)
  {
    setAttribute("value", paramString);
  }
  
  public HTMLButtonElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLButtonElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import java.io.Serializable;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.html.HTMLAnchorElement;
import org.w3c.dom.html.HTMLAppletElement;
import org.w3c.dom.html.HTMLAreaElement;
import org.w3c.dom.html.HTMLCollection;
import org.w3c.dom.html.HTMLElement;
import org.w3c.dom.html.HTMLFormElement;
import org.w3c.dom.html.HTMLImageElement;
import org.w3c.dom.html.HTMLObjectElement;
import org.w3c.dom.html.HTMLOptionElement;
import org.w3c.dom.html.HTMLTableCellElement;
import org.w3c.dom.html.HTMLTableRowElement;
import org.w3c.dom.html.HTMLTableSectionElement;

class HTMLCollectionImpl
  implements HTMLCollection, Serializable
{
  private static final long serialVersionUID = 9112122196669185082L;
  static final short ANCHOR = 1;
  static final short FORM = 2;
  static final short IMAGE = 3;
  static final short APPLET = 4;
  static final short LINK = 5;
  static final short OPTION = 6;
  static final short ROW = 7;
  static final short ELEMENT = 8;
  static final short AREA = -1;
  static final short TBODY = -2;
  static final short CELL = -3;
  private short _lookingFor;
  private Element _topLevel;
  
  HTMLCollectionImpl(HTMLElement paramHTMLElement, short paramShort)
  {
    if (paramHTMLElement == null) {
      throw new NullPointerException("HTM011 Argument 'topLevel' is null.");
    }
    _topLevel = paramHTMLElement;
    _lookingFor = paramShort;
  }
  
  public final int getLength()
  {
    return getLength(_topLevel);
  }
  
  public final Node item(int paramInt)
  {
    if (paramInt < 0) {
      throw new IllegalArgumentException("HTM012 Argument 'index' is negative.");
    }
    return item(_topLevel, new CollectionIndex(paramInt));
  }
  
  public final Node namedItem(String paramString)
  {
    if (paramString == null) {
      throw new NullPointerException("HTM013 Argument 'name' is null.");
    }
    return namedItem(_topLevel, paramString);
  }
  
  private int getLength(Element paramElement)
  {
    int i;
    synchronized (paramElement)
    {
      i = 0;
      for (Node localNode = paramElement.getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
        if ((localNode instanceof Element)) {
          if (collectionMatch((Element)localNode, null)) {
            i++;
          } else if (recurse()) {
            i += getLength((Element)localNode);
          }
        }
      }
    }
    return i;
  }
  
  private Node item(Element paramElement, CollectionIndex paramCollectionIndex)
  {
    synchronized (paramElement)
    {
      for (Node localNode1 = paramElement.getFirstChild(); localNode1 != null; localNode1 = localNode1.getNextSibling()) {
        if ((localNode1 instanceof Element))
        {
          Object localObject1;
          if (collectionMatch((Element)localNode1, null))
          {
            if (paramCollectionIndex.isZero())
            {
              localObject1 = localNode1;
              return (Node)localObject1;
            }
            paramCollectionIndex.decrement();
          }
          else if (recurse())
          {
            Node localNode2 = item((Element)localNode1, paramCollectionIndex);
            if (localNode2 != null)
            {
              localObject1 = localNode2;
              return (Node)localObject1;
            }
          }
        }
      }
    }
    return null;
  }
  
  private Node namedItem(Element paramElement, String paramString)
  {
    synchronized (paramElement)
    {
      for (Node localNode1 = paramElement.getFirstChild(); localNode1 != null; localNode1 = localNode1.getNextSibling()) {
        if ((localNode1 instanceof Element))
        {
          if (collectionMatch((Element)localNode1, paramString))
          {
            localNode3 = localNode1;
            return localNode3;
          }
          if (recurse())
          {
            Node localNode2 = namedItem((Element)localNode1, paramString);
            if (localNode2 != null)
            {
              Node localNode4 = localNode2;
              return localNode4;
            }
          }
        }
      }
      Node localNode3 = localNode1;
      return localNode3;
    }
  }
  
  protected boolean recurse()
  {
    return _lookingFor > 0;
  }
  
  protected boolean collectionMatch(Element paramElement, String paramString)
  {
    boolean bool1;
    synchronized (paramElement)
    {
      bool1 = false;
      switch (_lookingFor)
      {
      case 1: 
        bool1 = ((paramElement instanceof HTMLAnchorElement)) && (paramElement.getAttribute("name").length() > 0);
        break;
      case 2: 
        bool1 = paramElement instanceof HTMLFormElement;
        break;
      case 3: 
        bool1 = paramElement instanceof HTMLImageElement;
        break;
      case 4: 
        bool1 = ((paramElement instanceof HTMLAppletElement)) || (((paramElement instanceof HTMLObjectElement)) && (("application/java".equals(paramElement.getAttribute("codetype"))) || (paramElement.getAttribute("classid").startsWith("java:"))));
        break;
      case 8: 
        bool1 = paramElement instanceof HTMLFormControl;
        break;
      case 5: 
        bool1 = (((paramElement instanceof HTMLAnchorElement)) || ((paramElement instanceof HTMLAreaElement))) && (paramElement.getAttribute("href").length() > 0);
        break;
      case -1: 
        bool1 = paramElement instanceof HTMLAreaElement;
        break;
      case 6: 
        bool1 = paramElement instanceof HTMLOptionElement;
        break;
      case 7: 
        bool1 = paramElement instanceof HTMLTableRowElement;
        break;
      case -2: 
        bool1 = ((paramElement instanceof HTMLTableSectionElement)) && (paramElement.getTagName().equals("TBODY"));
        break;
      case -3: 
        bool1 = paramElement instanceof HTMLTableCellElement;
      }
      if ((bool1) && (paramString != null))
      {
        if (((paramElement instanceof HTMLAnchorElement)) && (paramString.equals(paramElement.getAttribute("name"))))
        {
          boolean bool2 = true;
          return bool2;
        }
        bool1 = paramString.equals(paramElement.getAttribute("id"));
      }
    }
    return bool1;
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLCollectionImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLDListElement;

public class HTMLDListElementImpl
  extends HTMLElementImpl
  implements HTMLDListElement
{
  private static final long serialVersionUID = -2130005642453038604L;
  
  public boolean getCompact()
  {
    return getBinary("compact");
  }
  
  public void setCompact(boolean paramBoolean)
  {
    setAttribute("compact", paramBoolean);
  }
  
  public HTMLDListElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLDListElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.apache.xerces.dom.DOMImplementationImpl;
import org.w3c.dom.DOMException;
import org.w3c.dom.html.HTMLDOMImplementation;
import org.w3c.dom.html.HTMLDocument;

public class HTMLDOMImplementationImpl
  extends DOMImplementationImpl
  implements HTMLDOMImplementation
{
  private static final HTMLDOMImplementation _instance = new HTMLDOMImplementationImpl();
  
  public final HTMLDocument createHTMLDocument(String paramString)
    throws DOMException
  {
    if (paramString == null) {
      throw new NullPointerException("HTM014 Argument 'title' is null.");
    }
    HTMLDocumentImpl localHTMLDocumentImpl = new HTMLDocumentImpl();
    localHTMLDocumentImpl.setTitle(paramString);
    return localHTMLDocumentImpl;
  }
  
  public static HTMLDOMImplementation getHTMLDOMImplementation()
  {
    return _instance;
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLDOMImplementationImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLDirectoryElement;

public class HTMLDirectoryElementImpl
  extends HTMLElementImpl
  implements HTMLDirectoryElement
{
  private static final long serialVersionUID = -1010376135190194454L;
  
  public boolean getCompact()
  {
    return getBinary("compact");
  }
  
  public void setCompact(boolean paramBoolean)
  {
    setAttribute("compact", paramBoolean);
  }
  
  public HTMLDirectoryElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLDirectoryElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import org.w3c.dom.html.HTMLDivElement;

public class HTMLDivElementImpl
  extends HTMLElementImpl
  implements HTMLDivElement
{
  private static final long serialVersionUID = 2327098984177358833L;
  
  public String getAlign()
  {
    return capitalize(getAttribute("align"));
  }
  
  public void setAlign(String paramString)
  {
    setAttribute("align", paramString);
  }
  
  public HTMLDivElementImpl(HTMLDocumentImpl paramHTMLDocumentImpl, String paramString)
  {
    super(paramHTMLDocumentImpl, paramString);
  }
}

/* Location:
 * Qualified Name:     org.apache.html.dom.HTMLDivElementImpl
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.html.dom;

import java.io.StringWriter;
import java.lang.reflect.Constructor;
import java.util.Hashtable;
import java.util.Locale;
import org.apache.xerces.dom.DocumentImpl;
import org.apache.xerces.dom.ElementImpl;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.html.HTMLBodyElement;
import org.w3c.dom.html.HTMLCollection;
import org.w3c.dom.html.HTMLDocument;
import org.w3c.dom.html.HTMLElement;
import org.w3c.dom.html.HTMLFrameSetElement;
import org.w3c.dom.html.HTMLHeadElement;
import org.w3c.dom.html.HTMLHtmlElement;
import org.w3c.dom.html.HTMLTitleElement;

public class HTMLDocumentImpl
  extends DocumentImpl
  implements HTMLDocument
{
  private static final long serialVersionUID = 4285791750126227180L;
  private HTMLCollectionImpl _anchors;
  private HTMLCollectionImpl _forms;
  private HTMLCollectionImpl _images;
  private HTMLCollectionImpl _links;
  private HTMLCollectionImpl _applets;
  private StringWriter _writer;
  private static Hashtable _elementTypesHTML;
  private static final Class[] _elemClassSigHTML = { HTMLDocumentImpl.class, String.class };
  
  public HTMLDocumentImpl()
  {
    populateElementTypes();
  }
  
  public synchronized Element getDocumentElement()
  {
    for (Object localObject1 = getFirstChild(); localObject1 != null; localObject1 = ((Node)localObject1).getNextSibling()) {
      if ((localObject1 instanceof HTMLHtmlElement)) {
        return (HTMLElement)localObject1;
      }
    }
    localObject1 = new HTMLHtmlElementImpl(this, "HTML");
    Node localNode;
    for (Object localObject2 = getFirstChild(); localObject2 != null; localObject2 = localNode)
    {
      localNode = ((Node)localObject2).getNextSibling();
      ((Node)localObject1).appendChild((Node)localObject2);
    }
    appendChild((Node)localObject1);
    return (HTMLElement)localObject1;
  }
  
  public synchronized HTMLElement getHead()
  {
    Element localElement1 = getDocumentElement();
    Object localObject1;
    synchronized (localElement1)
    {
      for (localObject1 = localElement1.getFirstChild(); (localObject1 != null) && (!(localObject1 instanceof HTMLHeadElement)); localObject1 = ((Node)localObject1).getNextSibling()) {}
      if (localObject1 != null)
      {
        synchronized (localObject1)
        {
          Object localObject2 = localElement1.getFirstChild();
          do
          {
            Node localNode = ((Node)localObject2).getNextSibling();
            ((Node)localObject1).insertBefore((Node)localObject2, ((Node)localObject1).getFirstChild());
            localObject2 = localNode;
            if (localObject2 == null) {
              break;
            }
          } while (localObject2 != localObject1);
        }
        HTMLElement localHTMLElement = (HTMLElement)localObject1;
        return localHTMLElement;
      }
      localObject1 = new HTMLHeadElementImpl(this, "HEAD");
      localElement1.insertBefore((Node)localObject1, localElement1.getFirstChild());
    }
    return (HTMLElement)localObject1;
  }
  
  public synchronized String getTitle()
  {
    HTMLElement localHTMLElement = getHead();
    NodeList localNodeList = localHTMLElement.getElementsByTagName("TITLE");
    if (localNodeList.getLength() > 0)
    {
      Node localNode = localNodeList.item(0);
      return ((HTMLTitleElement)localNode).getText();
    }
    return "";
  }
  
  public synchronized void setTitle(String paramString)
  {
    HTMLElement localHTMLElement = getHead();
    NodeList localNodeList = localHTMLElement.getElementsByTagName("TITLE");
    Object localObject;
    if (localNodeList.getLength() > 0)
    {
      localObject = localNodeList.item(0);
      if (((Node)localObject).getParentNode() != localHTMLElement) {
        localHTMLElement.appendChild((Node)localObject);
      }
      ((HTMLTitleElement)localObject).setText(paramString);
    }
    else
    {
      localObject = new HTMLTitleElementImpl(this, "TITLE");
      ((HTMLTitleElement)localObject).setText(paramString);
      localHTMLElement.appendChild((Node)localObject);
    }
  }
  
  public synchronized HTMLElement getBody()
  {
    Element localElement1 = getDocumentElement();
    HTMLElement localHTMLElement1 = getHead();
    Object localObject1;
    synchronized (localElement1)
    {
      for (localObject1 = localHTMLElement1.getNextSibling(); (localObject1 != null) && (!(localObject1 instanceof HTMLBodyElement)) && (!(localObject1 instanceof HTMLFrameSetElement)); localObject1 = ((Node)localObject1).getNextSibling()) {}
      if (localObject1 != null)
      {
        synchronized (localObject1)
        {
          Object localObject2 = localHTMLElement1.getNextSibling();
          do
          {
            Node localNode = ((Node)localObject2).getNextSibling();
            ((Node)localObject1).insertBefore((Node)localObject2, ((Node)localObject1).getFirstChild());
            localObject2 = localNode;
            if (localObject2 == null) {
              break;
            }
          } while (localObject2 != localObject1);
        }
        HTMLElement localHTMLElement2 = (HTMLElement)localObject1;
        return localHTMLElement2;
      }
      localObject1 = new HTMLBodyElementImpl(this, "BODY");
      localElement1.appendChild((Node)localObject1);
    }
    return (HTMLElement)localObject1;
  }
  
  public synchronized void setBody(HTMLElement paramHTMLElement)
  {
    synchronized (paramHTMLElement)
    {
      Element localElement1 = getDocumentElement();
      HTMLElement localHTMLElement1 = getHead();
      synchronized (localElement1)
      {
        NodeList localNodeList = getElementsByTagName("BODY");
        if (localNodeList.getLength() > 0)
        {
          Node localNode1 = localNodeList.item(0);
          synchronized (localNode1)
          {
            for (Object localObject1 = localHTMLElement1; localObject1 != null; localObject1 = ((Node)localObject1).getNextSibling()) {
              if ((localObject1 instanceof Element))
              {
                if (localObject1 != localNode1) {
                  localElement1.insertBefore(paramHTMLElement, (Node)localObject1);
                } else {
                  localElement1.replaceChild(paramHTMLElement, localNode1);
                }
                return;
              }
            }
            localElement1.appendChild(paramHTMLElement);
          }
          return;
        }
        localElement1.appendChild(paramHTMLElement);
      }
    }
  }
  
  public synchronized Element getElementById(String paramString)
  {
    Element localElement = super.getElementById(paramString);
    if (localElement != null) {
      return localElement;
    }
    return getElementById(paramString, this);
  }
  
  public NodeList getElementsByName(String paramString)
  {
    return new NameNodeListImpl(this, paramString);
  }
  
  public final NodeList getElementsByTagName(String paramString)
  {
    return super.getElementsByTagName(paramString.toUpperCase(Locale.ENGLISH));
  }
  
  public final NodeList getElementsByTagNameNS(String paramString1, String paramString2)
  {
    if ((paramString1 != null) && (paramString1.length() > 0)) {
      return super.getElementsByTagNameNS(paramString1, paramString2.toUpperCase(Locale.ENGLISH));
    }
    return super.getElementsByTagName(paramString2.toUpperCase(Locale.ENGLISH));
  }
  
  public Element createElementNS(String paramString1, String paramString2, String paramString3)
    throws DOMException
  {
    return createElementNS(paramString1, paramString2);
  }
  
  public Element createElementNS(String paramString1, String paramString2)
  {
    if ((paramString1 == null) || (paramString1.length() == 0)) {
      return createElement(paramString2);
    }
    return super.createElementNS(paramString1, paramString2);
  }
  
  public Element createElement(String paramString)
    throws DOMException
  {
    paramString = paramString.toUpperCase(Locale.ENGLISH);
    Class localClass = (Class)_elementTypesHTML.get(paramString);
    if (localClass != null) {
      try
      {
        Constructor localConstructor = localClass.getConstructor(_elemClassSigHTML);
        return (Element)localConstructor.newInstance(new Object[] { this, paramString });
      }
      catch (Exception localException)
      {
        throw new IllegalStateException("HTM15 Tag '" + paramString + "' associated with an Element class that failed to construct.\n" + paramString);
      }
    }
    return new HTMLElementImpl(this, paramString);
  }
  
  public Attr createAttribute(String paramString)
    throws DOMException
  {
    return super.createAttribute(paramString.toLowerCase(Locale.ENGLISH));
  }
  
  public String getReferrer()
  {
    return null;
  }
  
  public String getDomain()
  {
    return null;
  }
  
  public String getURL()
  {
    return null;
  }
  
  public String getCookie()
  {
    return null;
  }
  
  public void setCookie(String paramString) {}
  
  public HTMLCollection getImages()
  {
    if (_images == null) {
      _images = new HTMLCollectionImpl(getBody(), (short)3);
    }
    return _images;
  }
  
  public HTMLCollection getApplets()
  {
    if (_applets == null) {
      _applets = new HTMLCollectionImpl(getBody(), (short)4);
    }
    return _applets;
  }
  
  public HTMLCollection getLinks()
  {
    if (_links == null) {
      _links = new HTMLCollectionImpl(getBody(), (short)5);
    }
    return _links;
  }
  
  public HTMLCollection getForms()
  {
    if (_forms == null) {
      _forms = new HTMLCollectionImpl(getBody(), (short)2);
    }
    return _forms;
  }
  
  public HTMLCollection getAnchors()
  {
    if (_anchors == null) {
      _anchors = new HTMLCollectionImpl(getBody(), (short)1);
    }
    return _anchors;
  }
  
  public void open()
  {
    if (_writer == null) {
      _writer = new StringWriter();
    }
  }
  
  public void close()
  {
    if (_writer != null) {
      _writer = null;
    }
  }
  
  public void write(String paramString)
  {
    if (_writer != null) {
      _writer.write(paramString);
    }
  }
  
  public void writeln(String paramString)
  {
    if (_writer != null) {
      _writer.write(paramString + "\n");
    }
  }
  
  public Node cloneNode(boolean paramBoolean)
  {
    HTMLDocumentImpl localHTMLDocumentImpl = new HTMLDocumentImpl();
    callUserDataHandlers(this, localHTMLDocumentImpl, (short)1);
    cloneNode(localHTMLDocumentImpl, paramBoolean);
    return localHTMLDocumentImpl;
  }
  
  protected boolean canRenameElements(String paramString1, String paramString2, ElementImpl paramElementImpl)
  {
    if (paramElementImpl.getNamespaceURI() != null) {
      return paramString1 != null;
    }
    Class localClass1 = (Class)_elementTypesHTML.get(paramString2.toUpperCase(Locale.ENGLISH));
    Class localClass2 = (Class)_elementTypesHTML.get(paramElementImpl.getTagName());
    return localClass1 == localClass2;
  }
  
  private Element getElementById(String paramString, Node paramNode)
  {
    for (Node localNode = paramNode.getFirstChild(); localNode != null; localNode = localNode.getNextSibling()) {
      if ((localNode instanceof Element))
      {
        if (paramString.equals(((Element)localNode).getAttribute("id"))) {
          return (Element)localNode;
        }
        Element localElement = getElementById(paramString, localNode);
        if (localElement != null) {
          return localElement;
        }
      }
    }
    return null;
  }
  
  private static synchronized void populateElementTypes()
  {
    if (_elementTypesHTML != null) {
      return;
    }
    _elementTypesHTML = new Hashtable(63);
    populateElementType("A", 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd