View Javadoc

1   /*
2    * $Id: Doctype.java,v 1.4 2005/06/01 14:36:03 jlerner Exp $
3    *
4    * Copyright (c) 1999-2004, BBN Technologies, LLC.
5    * All rights reserved.
6    * http://www.daml.org/legal/opensource/bbn_license.html
7    */
8    
9   package com.bbn.swede.core.dom;
10  
11  /***
12   * Custom node implementation for the XML DOCTYPE element.  DOCTYPE is currently
13   * treated as simly text, but must be isolated and tracked as a node for
14   * reference during partial reparses to ensure proper handling of entities.
15   * @author jlerner
16   */
17  public class Doctype extends TextNode
18  {
19     /***
20      * Creates a Doctype node.
21      * @param sText The full text of the DOCTYPE node.
22      */
23     public Doctype(String sText)
24     {
25        super(sText);
26     }
27  
28     /* (non-Javadoc)
29      * @see com.bbn.swede.core.dom.OASTNode#allowedChildren()
30      */
31     protected int[] allowedChildren()
32     {
33        return null;
34     }
35  
36     /* (non-Javadoc)
37      * @see com.bbn.swede.core.dom.OASTNode#getNodeType()
38      */
39     public int getNodeType()
40     {
41        return OASTNode.DOCTYPE;
42     }
43  
44     /*
45      *  (non-Javadoc)
46      * @see java.lang.Object#toString()
47      */
48     public String toString()
49     {
50        return "DOCTYPE";
51     }
52  }