KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > dom > DocumentOverNodeInfo


1 package net.sf.saxon.dom;
2
3 import net.sf.saxon.om.Axis;
4 import net.sf.saxon.om.AxisIterator;
5 import net.sf.saxon.om.DocumentInfo;
6 import net.sf.saxon.om.NodeInfo;
7 import net.sf.saxon.type.Type;
8 import org.w3c.dom.*;
9
10 import java.util.ArrayList JavaDoc;
11
12 /**
13  * This class is an implementation of the DOM Document class that wraps a Saxon DocumentInfo
14  * representation of a document node.
15  */

16
17 public class DocumentOverNodeInfo extends NodeOverNodeInfo implements Document {
18
19     /**
20       * Get the Document Type Declaration (see <code>DocumentType</code> )
21       * associated with this document. For HTML documents as well as XML
22       * documents without a document type declaration this returns
23       * <code>null</code>. DOM method.
24       * @return null: The Saxon tree model does not include the document type
25       * information.
26       */

27
28      public DocumentType getDoctype() {
29          return null;
30      }
31
32      /**
33       * Get a <code>DOMImplementation</code> object that handles this document.
34       * A DOM application may use objects from multiple implementations.
35       * DOM method.
36       */

37
38      public DOMImplementation getImplementation() {
39          return new DOMImplementationImpl();
40      }
41
42      /**
43       * Creates an element of the type specified. DOM method: always fails,
44       * because the Saxon tree is not updateable.
45       */

46
47      public Element createElement(String JavaDoc tagName) throws DOMException {
48          disallowUpdate();
49          return null;
50      }
51
52      /**
53       * Creates an empty <code>DocumentFragment</code> object.
54       * @return A new <code>DocumentFragment</code> .
55       * DOM method: returns null, because the Saxon tree is not updateable.
56       */

57
58      public DocumentFragment createDocumentFragment() {
59          return null;
60      }
61
62      /**
63       * Create a <code>Text</code> node given the specified string.
64       * DOM method: returns null, because the Saxon tree is not updateable.
65       * @param data The data for the node.
66       * @return The new <code>Text</code> object.
67       */

68
69      public Text createTextNode(String JavaDoc data) {
70          return null;
71      }
72
73      /**
74       * Create a <code>Comment</code> node given the specified string.
75       * DOM method: returns null, because the Saxon tree is not updateable.
76       * @param data The data for the node.
77       * @return The new <code>Comment</code> object.
78       */

79      public Comment createComment(String JavaDoc data) {
80          return null;
81      }
82
83      /**
84       * Create a <code>CDATASection</code> node whose value is the specified
85       * string.
86       * DOM method: always fails, because the Saxon tree is not updateable.
87       * @param data The data for the <code>CDATASection</code> contents.
88       * @return The new <code>CDATASection</code> object.
89       * @exception org.w3c.dom.DOMException
90       * NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
91       */

92
93      public CDATASection createCDATASection(String JavaDoc data) throws DOMException {
94          disallowUpdate();
95          return null;
96      }
97
98      /**
99       * Create a <code>ProcessingInstruction</code> node given the specified
100       * name and data strings.
101       * DOM method: returns null, because the Saxon tree is not updateable.
102       * @param target The target part of the processing instruction.
103       * @param data The data for the node.
104       * @return The new <code>ProcessingInstruction</code> object.
105       * @exception org.w3c.dom.DOMException
106       * INVALID_CHARACTER_ERR: Raised if the specified target contains an
107       * illegal character.
108       * <br> NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
109       */

110
111      public ProcessingInstruction createProcessingInstruction(String JavaDoc target,
112                                                               String JavaDoc data)
113                                                               throws DOMException {
114          disallowUpdate();
115          return null;
116      }
117
118      /**
119       * Create an <code>Attr</code> of the given name.
120       * DOM method: always fails, because the Saxon tree is not updateable.
121       * @param name The name of the attribute.
122       * @return A new <code>Attr</code> object with the <code>nodeName</code>
123       * attribute set to <code>name</code> , and <code>localName</code> ,
124       * <code>prefix</code> , and <code>namespaceURI</code> set to
125       * <code>null</code> .
126       * @exception org.w3c.dom.DOMException
127       * INVALID_CHARACTER_ERR: Raised if the specified name contains an
128       * illegal character.
129       */

130
131      public Attr createAttribute(String JavaDoc name) throws DOMException {
132          disallowUpdate();
133          return null;
134      }
135
136      /**
137       * Create an <code>EntityReference</code> object.
138       * DOM method: returns null, because the Saxon tree is not updateable.
139       * @param name The name of the entity to reference.
140       * @return The new <code>EntityReference</code> object.
141       * @exception org.w3c.dom.DOMException
142       * INVALID_CHARACTER_ERR: Raised if the specified name contains an
143       * illegal character.
144       * <br> NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
145       */

146
147      public EntityReference createEntityReference(String JavaDoc name) throws DOMException {
148          disallowUpdate();
149          return null;
150      }
151
152      /**
153       * Return a <code>NodeList</code> of all the <code>Elements</code> with
154       * a given tag name in the order in which they are encountered in a
155       * preorder traversal of the <code>Document</code> tree.
156       * @param tagname The name of the tag to match on. The special value "*"
157       * matches all tags.
158       * @return A new <code>NodeList</code> object containing all the matched
159       * <code>Elements</code> .
160       */

161
162      public NodeList getElementsByTagName(String JavaDoc tagname) {
163          return getElementsByTagName(node, tagname);
164      }
165
166      protected static NodeList getElementsByTagName(NodeInfo node, String JavaDoc tagname) {
167          AxisIterator allElements = node.iterateAxis(Axis.DESCENDANT);
168          ArrayList JavaDoc nodes = new ArrayList JavaDoc(100);
169          while(true) {
170              NodeInfo next = (NodeInfo)allElements.next();
171              if (next == null) {
172                  break;
173              }
174              if (next.getNodeKind()==Type.ELEMENT) {
175                  if (tagname.equals("*") || tagname.equals(next.getDisplayName())) {
176                      nodes.add(NodeOverNodeInfo.wrap(next));
177                  }
178              }
179          }
180          return new DOMNodeList(nodes);
181      }
182
183
184      /**
185       * Import a node from another document to this document.
186       * DOM method: always fails, because the Saxon tree is not updateable.
187       * @exception org.w3c.dom.DOMException
188       * @since DOM Level 2
189       */

190
191      public Node importNode(Node importedNode, boolean deep) throws DOMException {
192          disallowUpdate();
193          return null;
194      }
195
196      /**
197       * Create an element of the given qualified name and namespace URI.
198       * HTML-only DOM implementations do not need to implement this method.
199       * DOM method: always fails, because the Saxon tree is not updateable.
200       * @param namespaceURI The namespace URI of the element to create.
201       * @param qualifiedName The qualified name of the element type to
202       * instantiate.
203       * @return A new <code>Element</code> object
204       * @exception org.w3c.dom.DOMException
205       */

206
207      public Element createElementNS(String JavaDoc namespaceURI,
208                                     String JavaDoc qualifiedName)
209                                     throws DOMException
210      {
211          disallowUpdate();
212          return null;
213      }
214
215      /**
216       * Create an attribute of the given qualified name and namespace URI.
217       * HTML-only DOM implementations do not need to implement this method.
218       * DOM method: returns null, because the Saxon tree is not updateable.
219       * @param namespaceURI The namespace URI of the attribute to create.
220       * @param qualifiedName The qualified name of the attribute to
221       * instantiate.
222       * @return A new <code>Attr</code> object.
223       * @exception org.w3c.dom.DOMException
224       */

225
226      public Attr createAttributeNS(String JavaDoc namespaceURI,
227                                    String JavaDoc qualifiedName)
228                                    throws DOMException {
229          disallowUpdate();
230          return null;
231      }
232
233      /**
234       * Return a <code>NodeList</code> of all the <code>Elements</code> with
235       * a given local name and namespace URI in the order in which they are
236       * encountered in a preorder traversal of the <code>Document</code> tree.
237       * DOM method.
238       * @param namespaceURI The namespace URI of the elements to match on.
239       * The special value "*" matches all namespaces.
240       * @param localName The local name of the elements to match on. The
241       * special value "*" matches all local names.
242       * @return A new <code>NodeList</code> object containing all the matched
243       * <code>Elements</code> .
244       * @since DOM Level 2
245       */

246
247      public NodeList getElementsByTagNameNS(String JavaDoc namespaceURI, String JavaDoc localName) {
248          return getElementsByTagNameNS(node, namespaceURI, localName);
249      }
250
251      public static NodeList getElementsByTagNameNS(NodeInfo node, String JavaDoc namespaceURI, String JavaDoc localName) {
252          AxisIterator allElements = node.iterateAxis(Axis.DESCENDANT);
253          ArrayList JavaDoc nodes = new ArrayList JavaDoc(100);
254          while(true) {
255              NodeInfo next = (NodeInfo)allElements.next();
256              if (next == null) {
257                  break;
258              }
259              if (next.getNodeKind()==Type.ELEMENT) {
260                  if ((namespaceURI.equals("*") || namespaceURI.equals(next.getURI())) &&
261                      (localName.equals("*") || localName.equals(next.getLocalPart()))) {
262                      nodes.add(NodeOverNodeInfo.wrap(next));
263                  }
264              }
265          }
266          return new DOMNodeList(nodes);
267      }
268
269      /**
270       * Return the <code>Element</code> whose <code>ID</code> is given by
271       * <code>elementId</code> . If no such element exists, returns
272       * <code>null</code> . Behavior is not defined if more than one element
273       * has this <code>ID</code> . The DOM implementation must have
274       * information that says which attributes are of type ID. Attributes with
275       * the name "ID" are not of type ID unless so defined. Implementations
276       * that do not know whether attributes are of type ID or not are expected
277       * to return <code>null</code> .
278       * @param elementId The unique <code>id</code> value for an element.
279       * @return The matching element, or null if there is none.
280       * @since DOM Level 2
281       */

282
283      public Element getElementById(String JavaDoc elementId) {
284          // Defined on Document node; but we support it on any node.
285
DocumentInfo doc = node.getDocumentRoot();
286          if (doc == null) {
287              return null;
288          }
289          return (Element)wrap(doc.selectID(elementId));
290      }
291
292     /**
293      * An attribute specifying the encoding used for this document at the time
294      * of the parsing. This is <code>null</code> when it is not known, such
295      * as when the <code>Document</code> was created in memory.
296      *
297      * @since DOM Level 3
298      */

299     public String JavaDoc getInputEncoding() {
300         return null;
301     }
302
303     /**
304      * An attribute specifying, as part of the
305      * <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>,
306      * the encoding of this document. This is <code>null</code> when
307      * unspecified or when it is not known, such as when the
308      * <code>Document</code> was created in memory.
309      *
310      * @since DOM Level 3
311      */

312     public String JavaDoc getXmlEncoding() {
313         return null;
314     }
315
316     /**
317      * An attribute specifying, as part of the
318      * <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>,
319      * whether this document is standalone. This is <code>false</code> when
320      * unspecified.
321      * <p ><b>Note:</b> No verification is done on the value when setting
322      * this attribute. Applications should use
323      * <code>Document.normalizeDocument()</code> with the "validate"
324      * parameter to verify if the value matches the <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
325      * constraint for standalone document declaration</a> as defined in [<a HREF='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
326      *
327      * @since DOM Level 3
328      */

329     public boolean getXmlStandalone() {
330         return false;
331     }
332
333     /**
334      * An attribute specifying, as part of the <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, whether this document is standalone. This is <code>false</code> when
335      * unspecified.
336      * <p ><b>Note:</b> No verification is done on the value when setting
337      * this attribute. Applications should use
338      * <code>Document.normalizeDocument()</code> with the "validate"
339      * parameter to verify if the value matches the <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
340      * constraint for standalone document declaration</a> as defined in [<a HREF='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
341      *
342      * @throws org.w3c.dom.DOMException NOT_SUPPORTED_ERR: Raised if this document does not support the
343      * "XML" feature.
344      * @since DOM Level 3
345      */

346     public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
347         disallowUpdate();
348     }
349
350     /**
351      * An attribute specifying, as part of the <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
352      * this document supports the "XML" feature, the value is
353      * <code>"1.0"</code>. If this document does not support the "XML"
354      * feature, the value is always <code>null</code>. Changing this
355      * attribute will affect methods that check for invalid characters in
356      * XML names. Application should invoke
357      * <code>Document.normalizeDocument()</code> in order to check for
358      * invalid characters in the <code>Node</code>s that are already part of
359      * this <code>Document</code>.
360      * <br> DOM applications may use the
361      * <code>DOMImplementation.hasFeature(feature, version)</code> method
362      * with parameter values "XMLVersion" and "1.0" (respectively) to
363      * determine if an implementation supports [<a HREF='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
364      * applications may use the same method with parameter values
365      * "XMLVersion" and "1.1" (respectively) to determine if an
366      * implementation supports [<a HREF='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
367      * cases, in order to support XML, an implementation must also support
368      * the "XML" feature defined in this specification. <code>Document</code>
369      * objects supporting a version of the "XMLVersion" feature must not
370      * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
371      * number when using <code>Document.xmlVersion</code>.
372      *
373      * @since DOM Level 3
374      */

375     public String JavaDoc getXmlVersion() {
376         return "1.0";
377     }
378
379     /**
380      * An attribute specifying, as part of the <a HREF='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
381      * this document supports the "XML" feature, the value is
382      * <code>"1.0"</code>. If this document does not support the "XML"
383      * feature, the value is always <code>null</code>. Changing this
384      * attribute will affect methods that check for invalid characters in
385      * XML names. Application should invoke
386      * <code>Document.normalizeDocument()</code> in order to check for
387      * invalid characters in the <code>Node</code>s that are already part of
388      * this <code>Document</code>.
389      * <br> DOM applications may use the
390      * <code>DOMImplementation.hasFeature(feature, version)</code> method
391      * with parameter values "XMLVersion" and "1.0" (respectively) to
392      * determine if an implementation supports [<a HREF='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
393      * applications may use the same method with parameter values
394      * "XMLVersion" and "1.1" (respectively) to determine if an
395      * implementation supports [<a HREF='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
396      * cases, in order to support XML, an implementation must also support
397      * the "XML" feature defined in this specification. <code>Document</code>
398      * objects supporting a version of the "XMLVersion" feature must not
399      * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
400      * number when using <code>Document.xmlVersion</code>.
401      *
402      * @throws org.w3c.dom.DOMException NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
403      * not supported by this <code>Document</code> or if this document
404      * does not support the "XML" feature.
405      * @since DOM Level 3
406      */

407     public void setXmlVersion(String JavaDoc xmlVersion) throws DOMException {
408         disallowUpdate();
409     }
410
411     /**
412      * An attribute specifying whether error checking is enforced or not. When
413      * set to <code>false</code>, the implementation is free to not test
414      * every possible error case normally defined on DOM operations, and not
415      * raise any <code>DOMException</code> on DOM operations or report
416      * errors while using <code>Document.normalizeDocument()</code>. In case
417      * of error, the behavior is undefined. This attribute is
418      * <code>true</code> by default.
419      *
420      * @since DOM Level 3
421      */

422     public boolean getStrictErrorChecking() {
423         return false;
424     }
425
426     /**
427      * An attribute specifying whether error checking is enforced or not. When
428      * set to <code>false</code>, the implementation is free to not test
429      * every possible error case normally defined on DOM operations, and not
430      * raise any <code>DOMException</code> on DOM operations or report
431      * errors while using <code>Document.normalizeDocument()</code>. In case
432      * of error, the behavior is undefined. This attribute is
433      * <code>true</code> by default.
434      *
435      * @since DOM Level 3
436      */

437     public void setStrictErrorChecking(boolean strictErrorChecking) {
438         //no-op
439
}
440
441     /**
442      * The location of the document or <code>null</code> if undefined or if
443      * the <code>Document</code> was created using
444      * <code>DOMImplementation.createDocument</code>. No lexical checking is
445      * performed when setting this attribute; this could result in a
446      * <code>null</code> value returned when using <code>Node.baseURI</code>
447      * .
448      * <br> Beware that when the <code>Document</code> supports the feature
449      * "HTML" [<a HREF='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
450      * , the href attribute of the HTML BASE element takes precedence over
451      * this attribute when computing <code>Node.baseURI</code>.
452      *
453      * @since DOM Level 3
454      */

455     public String JavaDoc getDocumentURI() {
456         return node.getSystemId();
457     }
458
459     /**
460      * The location of the document or <code>null</code> if undefined or if
461      * the <code>Document</code> was created using
462      * <code>DOMImplementation.createDocument</code>. No lexical checking is
463      * performed when setting this attribute; this could result in a
464      * <code>null</code> value returned when using <code>Node.baseURI</code>
465      * .
466      * <br> Beware that when the <code>Document</code> supports the feature
467      * "HTML" [<a HREF='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
468      * , the href attribute of the HTML BASE element takes precedence over
469      * this attribute when computing <code>Node.baseURI</code>.
470      *
471      * @since DOM Level 3
472      */

473     public void setDocumentURI(String JavaDoc documentURI) {
474         disallowUpdate();
475     }
476
477     /**
478      * Attempts to adopt a node from another document to this document. If
479      * supported, it changes the <code>ownerDocument</code> of the source
480      * node, its children, as well as the attached attribute nodes if there
481      * are any. If the source node has a parent it is first removed from the
482      * child list of its parent. This effectively allows moving a subtree
483      * from one document to another (unlike <code>importNode()</code> which
484      * create a copy of the source node instead of moving it). When it
485      * fails, applications should use <code>Document.importNode()</code>
486      * instead. Note that if the adopted node is already part of this
487      * document (i.e. the source and target document are the same), this
488      * method still has the effect of removing the source node from the
489      * child list of its parent, if any. The following list describes the
490      * specifics for each type of node.
491      * <dl>
492      * <dt>ATTRIBUTE_NODE</dt>
493      * <dd>The
494      * <code>ownerElement</code> attribute is set to <code>null</code> and
495      * the <code>specified</code> flag is set to <code>true</code> on the
496      * adopted <code>Attr</code>. The descendants of the source
497      * <code>Attr</code> are recursively adopted.</dd>
498      * <dt>DOCUMENT_FRAGMENT_NODE</dt>
499      * <dd>The
500      * descendants of the source node are recursively adopted.</dd>
501      * <dt>DOCUMENT_NODE</dt>
502      * <dd>
503      * <code>Document</code> nodes cannot be adopted.</dd>
504      * <dt>DOCUMENT_TYPE_NODE</dt>
505      * <dd>
506      * <code>DocumentType</code> nodes cannot be adopted.</dd>
507      * <dt>ELEMENT_NODE</dt>
508      * <dd><em>Specified</em> attribute nodes of the source element are adopted. Default attributes
509      * are discarded, though if the document being adopted into defines
510      * default attributes for this element name, those are assigned. The
511      * descendants of the source element are recursively adopted.</dd>
512      * <dt>ENTITY_NODE</dt>
513      * <dd>
514      * <code>Entity</code> nodes cannot be adopted.</dd>
515      * <dt>ENTITY_REFERENCE_NODE</dt>
516      * <dd>Only
517      * the <code>EntityReference</code> node itself is adopted, the
518      * descendants are discarded, since the source and destination documents
519      * might have defined the entity differently. If the document being
520      * imported into provides a definition for this entity name, its value
521      * is assigned.</dd>
522      * <dt>NOTATION_NODE</dt>
523      * <dd><code>Notation</code> nodes cannot be
524      * adopted.</dd>
525      * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE,
526      * COMMENT_NODE</dt>
527      * <dd>These nodes can all be adopted. No specifics.</dd>
528      * </dl>
529      * <p ><b>Note:</b> Since it does not create new nodes unlike the
530      * <code>Document.importNode()</code> method, this method does not raise
531      * an <code>INVALID_CHARACTER_ERR</code> exception, and applications
532      * should use the <code>Document.normalizeDocument()</code> method to
533      * check if an imported name is not an XML name according to the XML
534      * version in use.
535      *
536      * @param source The node to move into this document.
537      * @return The adopted node, or <code>null</code> if this operation
538      * fails, such as when the source node comes from a different
539      * implementation.
540      * @throws org.w3c.dom.DOMException NOT_SUPPORTED_ERR: Raised if the source node is of type
541      * <code>DOCUMENT</code>, <code>DOCUMENT_TYPE</code>.
542      * <br>NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is
543      * readonly.
544      * @since DOM Level 3
545      */

546     public Node adoptNode(Node source) throws DOMException {
547         disallowUpdate();
548         return null;
549     }
550
551     /**
552      * The configuration used when <code>Document.normalizeDocument()</code>
553      * is invoked.
554      *
555      * @since DOM Level 3
556      */

557     public DOMConfiguration getDomConfig() {
558         return null;
559     }
560
561     /**
562      * This method acts as if the document was going through a save and load
563      * cycle, putting the document in a "normal" form. As a consequence,
564      * this method updates the replacement tree of
565      * <code>EntityReference</code> nodes and normalizes <code>Text</code>
566      * nodes, as defined in the method <code>Node.normalize()</code>.
567      * <br> Otherwise, the actual result depends on the features being set on
568      * the <code>Document.domConfig</code> object and governing what
569      * operations actually take place. Noticeably this method could also
570      * make the document namespace well-formed according to the algorithm
571      * described in , check the character normalization, remove the
572      * <code>CDATASection</code> nodes, etc. See
573      * <code>DOMConfiguration</code> for details.
574      * <pre>// Keep in the document
575      * the information defined // in the XML Information Set (Java example)
576      * DOMConfiguration docConfig = myDocument.getDomConfig();
577      * docConfig.setParameter("infoset", Boolean.TRUE);
578      * myDocument.normalizeDocument();</pre>
579      * <p/>
580      * <br>Mutation events, when supported, are generated to reflect the
581      * changes occurring on the document.
582      * <br> If errors occur during the invocation of this method, such as an
583      * attempt to update a read-only node or a <code>Node.nodeName</code>
584      * contains an invalid character according to the XML version in use,
585      * errors or warnings (<code>DOMError.SEVERITY_ERROR</code> or
586      * <code>DOMError.SEVERITY_WARNING</code>) will be reported using the
587      * <code>DOMErrorHandler</code> object associated with the "error-handler
588      * " parameter. Note this method might also report fatal errors (
589      * <code>DOMError.SEVERITY_FATAL_ERROR</code>) if an implementation
590      * cannot recover from an error.
591      *
592      * @since DOM Level 3
593      */

594     public void normalizeDocument() {
595         disallowUpdate();
596     }
597
598     /**
599      * Rename an existing node of type <code>ELEMENT_NODE</code> or
600      * <code>ATTRIBUTE_NODE</code>. Not supported in this implementation
601      *
602      * @param n The node to rename.
603      * @param namespaceURI The new namespace URI.
604      * @param qualifiedName The new qualified name.
605      * @return The renamed node. This is either the specified node or the new
606      * node that was created to replace the specified node.
607      * @throws org.w3c.dom.DOMException
608      */

609     public Node renameNode(Node n, String JavaDoc namespaceURI, String JavaDoc qualifiedName) throws DOMException {
610         disallowUpdate();
611         return null;
612     }
613
614
615 }
616
617 //
618
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
619
// you may not use this file except in compliance with the License. You may obtain a copy of the
620
// License at http://www.mozilla.org/MPL/
621
//
622
// Software distributed under the License is distributed on an "AS IS" basis,
623
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
624
// See the License for the specific language governing rights and limitations under the License.
625
//
626
// The Original Code is: all this file.
627
//
628
// The Initial Developer of the Original Code is Michael H. Kay.
629
//
630
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
631
//
632
// Contributor(s): none.
633
//
Popular Tags