This file is indexed.

/usr/include/xercesc/dom/DOMDocument.hpp is in libxerces-c2-dev 2.8.0+deb1-2build3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
#ifndef DOMDocument_HEADER_GUARD_
#define DOMDocument_HEADER_GUARD_

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * $Id: DOMDocument.hpp 568078 2007-08-21 11:43:25Z amassari $
*/

#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMNode.hpp>
#include <xercesc/dom/DOMDocumentRange.hpp>
#include <xercesc/dom/DOMDocumentTraversal.hpp>
#include <xercesc/dom/DOMXPathEvaluator.hpp>

XERCES_CPP_NAMESPACE_BEGIN

class DOMConfiguration;
class DOMDocumentType;
class DOMElement;
class DOMDocumentFragment;
class DOMComment;
class DOMCDATASection;
class DOMProcessingInstruction;
class DOMAttr;
class DOMEntity;
class DOMEntityReference;
class DOMImplementation;
class DOMNodeFilter;
class DOMNodeList;
class DOMNotation;
class DOMText;
class DOMNode;


/**
 * The <code>DOMDocument</code> interface represents the entire XML
 * document. Conceptually, it is the root of the document tree, and provides
 * the primary access to the document's data.
 * <p>Since elements, text nodes, comments, processing instructions, etc.
 * cannot exist outside the context of a <code>DOMDocument</code>, the
 * <code>DOMDocument</code> interface also contains the factory methods needed
 * to create these objects. The <code>DOMNode</code> objects created have a
 * <code>ownerDocument</code> attribute which associates them with the
 * <code>DOMDocument</code> within whose context they were created.
 * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
 */

class CDOM_EXPORT DOMDocument: public DOMDocumentRange,
 public DOMXPathEvaluator,
 public DOMDocumentTraversal,
 public DOMNode {


protected:
    // -----------------------------------------------------------------------
    //  Hidden constructors
    // -----------------------------------------------------------------------
    /** @name Hidden constructors */
    //@{    
    DOMDocument() {};
    //@}

private:
    // -----------------------------------------------------------------------
    // Unimplemented constructors and operators
    // -----------------------------------------------------------------------
    /** @name Unimplemented constructors and operators */
    //@{
    DOMDocument(const DOMDocument &);
    DOMDocument & operator = (const DOMDocument &);
    //@}

public:
    // -----------------------------------------------------------------------
    //  All constructors are hidden, just the destructor is available
    // -----------------------------------------------------------------------
    /** @name Destructor */
    //@{
    /**
     * Destructor
     *
     */
    virtual ~DOMDocument() {};
    //@}

    // -----------------------------------------------------------------------
    // Virtual DOMDocument interface
    // -----------------------------------------------------------------------
    /** @name Functions introduced in DOM Level 1 */
    //@{
    /**
     * Creates an element of the type specified. Note that the instance
     * returned implements the <code>DOMElement</code> interface, so attributes
     * can be specified directly on the returned object.
     * <br>In addition, if there are known attributes with default values,
     * <code>DOMAttr</code> nodes representing them are automatically created
     * and attached to the element.
     * <br>To create an element with a qualified name and namespace URI, use
     * the <code>createElementNS</code> method.
     * @param tagName The name of the element type to instantiate. For XML,
     *   this is case-sensitive.
     * @return A new <code>DOMElement</code> object with the
     *   <code>nodeName</code> attribute set to <code>tagName</code>, and
     *   <code>localName</code>, <code>prefix</code>, and
     *   <code>namespaceURI</code> set to <code>null</code>.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     * @since DOM Level 1
     */
    virtual DOMElement     *createElement(const XMLCh *tagName) = 0;

    /**
     * Creates an empty <code>DOMDocumentFragment</code> object.
     * @return A new <code>DOMDocumentFragment</code>.
     * @since DOM Level 1
     */
    virtual DOMDocumentFragment   *createDocumentFragment() = 0;

    /**
     * Creates a <code>DOMText</code> node given the specified string.
     * @param data The data for the node.
     * @return The new <code>DOMText</code> object.
     * @since DOM Level 1
     */
    virtual DOMText         *createTextNode(const XMLCh *data) = 0;

    /**
     * Creates a <code>DOMComment</code> node given the specified string.
     * @param data The data for the node.
     * @return The new <code>DOMComment</code> object.
     * @since DOM Level 1
     */
    virtual DOMComment      *createComment(const XMLCh *data) = 0;

    /**
     * Creates a <code>DOMCDATASection</code> node whose value is the specified
     * string.
     * @param data The data for the <code>DOMCDATASection</code> contents.
     * @return The new <code>DOMCDATASection</code> object.
     * @since DOM Level 1
     */
    virtual DOMCDATASection   *createCDATASection(const XMLCh *data) = 0;

    /**
     * Creates a <code>DOMProcessingInstruction</code> node given the specified
     * name and data strings.
     * @param target The target part of the processing instruction.
     * @param data The data for the node.
     * @return The new <code>DOMProcessingInstruction</code> object.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified target contains an
     *   illegal character.
     * @since DOM Level 1
     */
    virtual DOMProcessingInstruction *createProcessingInstruction(const XMLCh *target,
        const XMLCh *data) = 0;


    /**
     * Creates an <code>DOMAttr</code> of the given name. Note that the
     * <code>DOMAttr</code> instance can then be set on an <code>DOMElement</code>
     * using the <code>setAttributeNode</code> method.
     * <br>To create an attribute with a qualified name and namespace URI, use
     * the <code>createAttributeNS</code> method.
     * @param name The name of the attribute.
     * @return A new <code>DOMAttr</code> object with the <code>nodeName</code>
     *   attribute set to <code>name</code>, and <code>localName</code>,
     *   <code>prefix</code>, and <code>namespaceURI</code> set to
     *   <code>null</code>. The value of the attribute is the empty string.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     * @since DOM Level 1
     */
    virtual DOMAttr     *createAttribute(const XMLCh *name) = 0;


    /**
     * Creates an <code>DOMEntityReference</code> object. In addition, if the
     * referenced entity is known, the child list of the
     * <code>DOMEntityReference</code> node is made the same as that of the
     * corresponding <code>DOMEntity</code> node.If any descendant of the
     * <code>DOMEntity</code> node has an unbound namespace prefix, the
     * corresponding descendant of the created <code>DOMEntityReference</code>
     * node is also unbound; (its <code>namespaceURI</code> is
     * <code>null</code>). The DOM Level 2 does not support any mechanism to
     * resolve namespace prefixes.
     * @param name The name of the entity to reference.
     * @return The new <code>DOMEntityReference</code> object.
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
     *   illegal character.
     * @since DOM Level 1
     */
    virtual DOMEntityReference    *createEntityReference(const XMLCh *name) = 0;

    /**
     * The Document Type Declaration (see <code>DOMDocumentType</code>)
     * associated with this document. For XML
     * documents without a document type declaration this returns
     * <code>null</code>. The DOM Level 2 does not support editing the
     * Document Type Declaration. <code>docType</code> cannot be altered in
     * any way, including through the use of methods inherited from the
     * <code>DOMNode</code> interface, such as <code>insertNode</code> or
     * <code>removeNode</code>.
     * @since DOM Level 1
     */
    virtual DOMDocumentType       *getDoctype() const = 0;

    /**
     * The <code>DOMImplementation</code> object that handles this document. A
     * DOM application may use objects from multiple implementations.
     * @since DOM Level 1
     */
    virtual DOMImplementation  *getImplementation() const = 0;

    /**
     * This is a convenience attribute that allows direct access to the child
     * node that is the root element of the document.
     * @since DOM Level 1
     */
    virtual DOMElement     *getDocumentElement() const = 0;

    /**
     * Returns a <code>DOMNodeList</code> of all the <code>DOMElement(s)</code> with a
     * given tag name in the order in which they are encountered in a
     * preorder traversal of the <code>DOMDocument</code> tree.
     *
     * The returned node list is "live", in that changes
     * to the document tree made after a nodelist was initially
     * returned will be immediately reflected in the node list.
     * @param tagname The name of the tag to match on. The special value "*"
     *   matches all tags.
     * @return A new <code>DOMNodeList</code> object containing all the matched
     *   <code>DOMElement(s)</code>.
     * @since DOM Level 1
     */
    virtual DOMNodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;

    //@}

    /** @name Functions introduced in DOM Level 2. */
    //@{

    /**
     * Imports a node from another document to this document. The returned
     * node has no parent; (<code>parentNode</code> is <code>null</code>).
     * The source node is not altered or removed from the original document;
     * this method creates a new copy of the source node.
     * <br>For all nodes, importing a node creates a node object owned by the
     * importing document, with attribute values identical to the source
     * node's <code>nodeName</code> and <code>nodeType</code>, plus the
     * attributes related to namespaces (<code>prefix</code>,
     * <code>localName</code>, and <code>namespaceURI</code>). As in the
     * <code>cloneNode</code> operation on a <code>DOMNode</code>, the source
     * node is not altered.
     * <br>Additional information is copied as appropriate to the
     * <code>nodeType</code>, attempting to mirror the behavior expected if
     * a fragment of XML source was copied from one document to
     * another, recognizing that the two documents may have different DTDs
     * in the XML case. The following list describes the specifics for each
     * type of node.
     * <dl>
     * <dt>ATTRIBUTE_NODE</dt>
     * <dd>The <code>ownerElement</code> attribute
     * is set to <code>null</code> and the <code>specified</code> flag is
     * set to <code>true</code> on the generated <code>DOMAttr</code>. The
     * descendants of the source <code>DOMAttr</code> are recursively imported
     * and the resulting nodes reassembled to form the corresponding subtree.
     * Note that the <code>deep</code> parameter has no effect on
     * <code>DOMAttr</code> nodes; they always carry their children with them
     * when imported.</dd>
     * <dt>DOCUMENT_FRAGMENT_NODE</dt>
     * <dd>If the <code>deep</code> option
     * was set to <code>true</code>, the descendants of the source element
     * are recursively imported and the resulting nodes reassembled to form
     * the corresponding subtree. Otherwise, this simply generates an empty
     * <code>DOMDocumentFragment</code>.</dd>
     * <dt>DOCUMENT_NODE</dt>
     * <dd><code>DOMDocument</code>
     * nodes cannot be imported.</dd>
     * <dt>DOCUMENT_TYPE_NODE</dt>
     * <dd><code>DOMDocumentType</code>
     * nodes cannot be imported.</dd>
     * <dt>ELEMENT_NODE</dt>
     * <dd>Specified attribute nodes of the
     * source element are imported, and the generated <code>DOMAttr</code>
     * nodes are attached to the generated <code>DOMElement</code>. Default
     * attributes are not copied, though if the document being imported into
     * defines default attributes for this element name, those are assigned.
     * If the <code>importNode</code> <code>deep</code> parameter was set to
     * <code>true</code>, the descendants of the source element are
     * recursively imported and the resulting nodes reassembled to form the
     * corresponding subtree.</dd>
     * <dt>ENTITY_NODE</dt>
     * <dd><code>DOMEntity</code> nodes can be
     * imported, however in the current release of the DOM the
     * <code>DOMDocumentType</code> is readonly. Ability to add these imported
     * nodes to a <code>DOMDocumentType</code> will be considered for addition
     * to a future release of the DOM.On import, the <code>publicId</code>,
     * <code>systemId</code>, and <code>notationName</code> attributes are
     * copied. If a <code>deep</code> import is requested, the descendants
     * of the the source <code>DOMEntity</code> are recursively imported and
     * the resulting nodes reassembled to form the corresponding subtree.</dd>
     * <dt>
     * ENTITY_REFERENCE_NODE</dt>
     * <dd>Only the <code>DOMEntityReference</code> itself is
     * copied, even if a <code>deep</code> import is requested, since the
     * source and destination documents might have defined the entity
     * differently. If the document being imported into provides a
     * definition for this entity name, its value is assigned.</dd>
     * <dt>NOTATION_NODE</dt>
     * <dd>
     * <code>DOMNotation</code> nodes can be imported, however in the current
     * release of the DOM the <code>DOMDocumentType</code> is readonly. Ability
     * to add these imported nodes to a <code>DOMDocumentType</code> will be
     * considered for addition to a future release of the DOM.On import, the
     * <code>publicId</code> and <code>systemId</code> attributes are copied.
     * Note that the <code>deep</code> parameter has no effect on
     * <code>DOMNotation</code> nodes since they never have any children.</dd>
     * <dt>
     * PROCESSING_INSTRUCTION_NODE</dt>
     * <dd>The imported node copies its
     * <code>target</code> and <code>data</code> values from those of the
     * source node.</dd>
     * <dt>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</dt>
     * <dd>These three
     * types of nodes inheriting from <code>DOMCharacterData</code> copy their
     * <code>data</code> and <code>length</code> attributes from those of
     * the source node.</dd>
     * </dl>
     * @param importedNode The node to import.
     * @param deep If <code>true</code>, recursively import the subtree under
     *   the specified node; if <code>false</code>, import only the node
     *   itself, as explained above. This has no effect on <code>DOMAttr</code>
     *   , <code>DOMEntityReference</code>, and <code>DOMNotation</code> nodes.
     * @return The imported node that belongs to this <code>DOMDocument</code>.
     * @exception DOMException
     *   NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
     *   supported.
     * @since DOM Level 2
     */
    virtual DOMNode        *importNode(DOMNode *importedNode, bool deep) = 0;

    /**
     * Creates an element of the given qualified name and namespace URI.
     * @param namespaceURI The namespace URI of the element to create.
     * @param qualifiedName The qualified name of the element type to
     *   instantiate.
     * @return A new <code>DOMElement</code> object with the following
     *   attributes:
     * <table border='1'>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>Attribute</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>Value</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.nodeName</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>qualifiedName</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.namespaceURI</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>namespaceURI</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.prefix</code></td>
     * <td valign='top' rowspan='1' colspan='1'>prefix, extracted
     *   from <code>qualifiedName</code>, or <code>null</code> if there is
     *   no prefix</td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.localName</code></td>
     * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
     *   <code>qualifiedName</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMElement.tagName</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>qualifiedName</code></td>
     * </tr>
     * </table>
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name
     *   contains an illegal character, per the XML 1.0 specification .
     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
     *   malformed per the Namespaces in XML specification, if the
     *   <code>qualifiedName</code> has a prefix and the
     *   <code>namespaceURI</code> is <code>null</code>, or if the
     *   <code>qualifiedName</code> has a prefix that is "xml" and the
     *   <code>namespaceURI</code> is different from "
     *   http://www.w3.org/XML/1998/namespace" .
     *   <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
     *   support the <code>"XML"</code> feature, since namespaces were
     *   defined by XML.
     * @since DOM Level 2
     */
    virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
	                                              const XMLCh *qualifiedName) = 0;

    /**
     * Creates an attribute of the given qualified name and namespace URI.
     * @param namespaceURI The namespace URI of the attribute to create.
     * @param qualifiedName The qualified name of the attribute to
     *   instantiate.
     * @return A new <code>DOMAttr</code> object with the following attributes:
     * <table border='1'>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>Attribute</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>Value</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.nodeName</code></td>
     * <td valign='top' rowspan='1' colspan='1'>qualifiedName</td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>DOMNode.namespaceURI</code></td>
     * <td valign='top' rowspan='1' colspan='1'><code>namespaceURI</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>DOMNode.prefix</code></td>
     * <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
     *   <code>qualifiedName</code>, or <code>null</code> if there is no
     *   prefix</td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.localName</code></td>
     * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
     *   <code>qualifiedName</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMAttr.name</code></td>
     * <td valign='top' rowspan='1' colspan='1'>
     *   <code>qualifiedName</code></td>
     * </tr>
     * <tr>
     * <td valign='top' rowspan='1' colspan='1'><code>DOMNode.nodeValue</code></td>
     * <td valign='top' rowspan='1' colspan='1'>the empty
     *   string</td>
     * </tr>
     * </table>
     * @exception DOMException
     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name
     *   contains an illegal character, per the XML 1.0 specification .
     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
     *   malformed per the Namespaces in XML specification, if the
     *   <code>qualifiedName</code> has a prefix and the
     *   <code>namespaceURI</code> is <code>null</code>, if the
     *   <code>qualifiedName</code> has a prefix that is "xml" and the
     *   <code>namespaceURI</code> is different from "
     *   http://www.w3.org/XML/1998/namespace", or if the
     *   <code>qualifiedName</code>, or its prefix, is "xmlns" and the
     *   <code>namespaceURI</code> is different from "
     *   http://www.w3.org/2000/xmlns/".
     *   <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
     *   support the <code>"XML"</code> feature, since namespaces were
     *   defined by XML.
     * @since DOM Level 2
     */
    virtual DOMAttr        *createAttributeNS(const XMLCh *namespaceURI,
	                                            const XMLCh *qualifiedName) = 0;

    /**
     * Returns a <code>DOMNodeList</code> of all the <code>DOMElement(s)</code> with a
     * given local name and namespace URI in the order in which they are
     * encountered in a preorder traversal of the <code>DOMDocument</code> tree.
     * @param namespaceURI The namespace URI of the elements to match on. The
     *   special value "*" matches all namespaces.
     * @param localName The local name of the elements to match on. The
     *   special value "*" matches all local names.
     * @return A new <code>DOMNodeList</code> object containing all the matched
     *   <code>DOMElement(s)</code>.
     * @since DOM Level 2
     */
    virtual DOMNodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
	                                                     const XMLCh *localName) const = 0;

    /**
     * Returns the <code>DOMElement</code> whose <code>ID</code> is given by
     * <code>elementId</code>. If no such element exists, returns
     * <code>null</code>. Behavior is not defined if more than one element
     * has this <code>ID</code>. The DOM implementation must have
     * information that says which attributes are of type ID. Attributes
     * with the name "ID" are not of type ID unless so defined.
     * Implementations that do not know whether attributes are of type ID or
     * not are expected to return <code>null</code>.
     * @param elementId The unique <code>id</code> value for an element.
     * @return The matching element.
     * @since DOM Level 2
     */
    virtual  DOMElement        * getElementById(const XMLCh *elementId) const = 0;
    //@}

    /** @name Functions introduced in DOM Level 3. */
    //@{

    /**
     * An attribute specifying the actual encoding of this document. This is
     * <code>null</code> otherwise.
     * <br> This attribute represents the property [character encoding scheme]
     * defined in.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual const XMLCh*           getActualEncoding() const = 0;

    /**
     * An attribute specifying the actual encoding of this document. This is
     * <code>null</code> otherwise.
     * <br> This attribute represents the property [character encoding scheme]
     * defined in .
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setActualEncoding(const XMLCh* actualEncoding) = 0;

    /**
     * An attribute specifying, as part of the XML declaration, the encoding
     * of this document. This is <code>null</code> when unspecified.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual const XMLCh*           getEncoding() const = 0;

    /**
     * An attribute specifying, as part of the XML declaration, the encoding
     * of this document. This is <code>null</code> when unspecified.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setEncoding(const XMLCh* encoding) = 0;

    /**
     * An attribute specifying, as part of the XML declaration, whether this
     * document is standalone.
     * <br> This attribute represents the property [standalone] defined in .
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual bool                   getStandalone() const = 0;

    /**
     * An attribute specifying, as part of the XML declaration, whether this
     * document is standalone.
     * <br> This attribute represents the property [standalone] defined in .
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setStandalone(bool standalone) = 0;

    /**
     * An attribute specifying, as part of the XML declaration, the version
     * number of this document. This is <code>null</code> when unspecified.
     * <br> This attribute represents the property [version] defined in .
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual const XMLCh*           getVersion() const = 0;

    /**
     * An attribute specifying, as part of the XML declaration, the version
     * number of this document. This is <code>null</code> when unspecified.
     * <br> This attribute represents the property [version] defined in .
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setVersion(const XMLCh* version) = 0;

    /**
     * The location of the document or <code>null</code> if undefined.
     * <br>Beware that when the <code>DOMDocument</code> supports the feature
     * "HTML" , the href attribute of the HTML BASE element takes precedence
     * over this attribute.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual const XMLCh*           getDocumentURI() const = 0;
    /**
     * The location of the document or <code>null</code> if undefined.
     * <br>Beware that when the <code>DOMDocument</code> supports the feature
     * "HTML" , the href attribute of the HTML BASE element takes precedence
     * over this attribute.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setDocumentURI(const XMLCh* documentURI) = 0;

    /**
     * An attribute specifying whether errors checking is enforced or not.
     * When set to <code>false</code>, the implementation is free to not
     * test every possible error case normally defined on DOM operations,
     * and not raise any <code>DOMException</code>. In case of error, the
     * behavior is undefined. This attribute is <code>true</code> by
     * defaults.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual bool                   getStrictErrorChecking() const = 0;
    /**
     * An attribute specifying whether errors checking is enforced or not.
     * When set to <code>false</code>, the implementation is free to not
     * test every possible error case normally defined on DOM operations,
     * and not raise any <code>DOMException</code>. In case of error, the
     * behavior is undefined. This attribute is <code>true</code> by
     * defaults.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @since DOM Level 3
     */
    virtual void                   setStrictErrorChecking(bool strictErrorChecking) = 0;

    /**
     * Rename an existing node. When possible this simply changes the name of
     * the given node, otherwise this creates a new node with the specified
     * name and replaces the existing node with the new node as described
     * below. This only applies to nodes of type <code>ELEMENT_NODE</code>
     * and <code>ATTRIBUTE_NODE</code>.
     * <br>When a new node is created, the following operations are performed:
     * the new node is created, any registered event listener is registered
     * on the new node, any user data attached to the old node is removed
     * from that node, the old node is removed from its parent if it has
     * one, the children are moved to the new node, if the renamed node is
     * an <code>DOMElement</code> its attributes are moved to the new node, the
     * new node is inserted at the position the old node used to have in its
     * parent's child nodes list if it has one, the user data that was
     * attached to the old node is attach to the new node, the user data
     * event <code>NODE_RENAMED</code> is fired.
     * <br>When the node being renamed is an <code>DOMAttr</code> that is
     * attached to an <code>DOMElement</code>, the node is first removed from
     * the <code>DOMElement</code> attributes map. Then, once renamed, either
     * by modifying the existing node or creating a new one as described
     * above, it is put back.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * @param n The node to rename.
     * @param namespaceURI The new namespaceURI.
     * @param name The new qualified name.
     * @return The renamed node. This is either the specified node or the new
     *   node that was created to replace the specified node.
     * @exception DOMException
     *   NOT_SUPPORTED_ERR: Raised when the type of the specified node is
     *   neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>.
     *   <br>WRONG_DOCUMENT_ERR: Raised when the specified node was created
     *   from a different document than this document.
     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
     *   malformed per the Namespaces in XML specification, if the
     *   <code>qualifiedName</code> has a prefix and the
     *   <code>namespaceURI</code> is <code>null</code>, or if the
     *   <code>qualifiedName</code> has a prefix that is "xml" and the
     *   <code>namespaceURI</code> is different from "
     *   http://www.w3.org/XML/1998/namespace" . Also raised, when the node
     *   being renamed is an attribute, if the <code>qualifiedName</code>,
     *   or its prefix, is "xmlns" and the <code>namespaceURI</code> is
     *   different from "http://www.w3.org/2000/xmlns/".
     * @since DOM Level 3
     */
    virtual DOMNode* renameNode(DOMNode* n, const XMLCh* namespaceURI, const XMLCh* name) = 0;


    /**
     * Changes the <code>ownerDocument</code> of a node, its children, as well
     * as the attached attribute nodes if there are any. If the node has a
     * parent it is first removed from its parent child list. This
     * effectively allows moving a subtree from one document to another. The
     * following list describes the specifics for each type of node.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * <dl>
     * <dt>
     * ATTRIBUTE_NODE</dt>
     * <dd>The <code>ownerElement</code> attribute is set to
     * <code>null</code> and the <code>specified</code> flag is set to
     * <code>true</code> on the adopted <code>DOMAttr</code>. The descendants
     * of the source <code>DOMAttr</code> are recursively adopted.</dd>
     * <dt>
     * DOCUMENT_FRAGMENT_NODE</dt>
     * <dd>The descendants of the source node are
     * recursively adopted.</dd>
     * <dt>DOCUMENT_NODE</dt>
     * <dd><code>DOMDocument</code> nodes cannot
     * be adopted.</dd>
     * <dt>DOCUMENT_TYPE_NODE</dt>
     * <dd><code>DOMDocumentType</code> nodes cannot
     * be adopted.</dd>
     * <dt>ELEMENT_NODE</dt>
     * <dd>Specified attribute nodes of the source
     * element are adopted, and the generated <code>DOMAttr</code> nodes.
     * Default attributes are discarded, though if the document being
     * adopted into defines default attributes for this element name, those
     * are assigned. The descendants of the source element are recursively
     * adopted.</dd>
     * <dt>ENTITY_NODE</dt>
     * <dd><code>DOMEntity</code> nodes cannot be adopted.</dd>
     * <dt>
     * ENTITY_REFERENCE_NODE</dt>
     * <dd>Only the <code>DOMEntityReference</code> node
     * itself is adopted, the descendants are discarded, since the source
     * and destination documents might have defined the entity differently.
     * If the document being imported into provides a definition for this
     * entity name, its value is assigned.</dd>
     * <dt>NOTATION_NODE</dt>
     * <dd><code>DOMNotation</code>
     * nodes cannot be adopted.</dd>
     * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE,
     * CDATA_SECTION_NODE, COMMENT_NODE</dt>
     * <dd>These nodes can all be adopted. No
     * specifics.</dd>
     * </dl>
     * @param source The node to move into this document.
     * @return The adopted node, or <code>null</code> if this operation
     *   fails, such as when the source node comes from a different
     *   implementation.
     * @exception DOMException
     *   NOT_SUPPORTED_ERR: Raised if the source node is of type
     *   <code>DOCUMENT</code>, <code>DOCUMENT_TYPE</code>.
     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is
     *   readonly.
     * @since DOM Level 3
     */
    virtual DOMNode*               adoptNode(DOMNode* source) = 0;

    /**
     * This method acts as if the document was going through a save and load
     * cycle, putting the document in a "normal" form. The actual result
     * depends on the features being set. See <code>DOMConfiguration</code> for 
     * details.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     *
     * <br>Noticeably this method normalizes <code>DOMText</code> nodes, makes
     * the document "namespace wellformed", according to the algorithm
     * described below in pseudo code, by adding missing namespace
     * declaration attributes and adding or changing namespace prefixes,
     * updates the replacement tree of <code>DOMEntityReference</code> nodes,
     * normalizes attribute values, etc.
     * <br>Mutation events, when supported, are generated to reflect the
     * changes occuring on the document.
     * Note that this is a partial implementation. Not all the required features are implemented.
     * Currently <code>DOMAttr</code> and <code>DOMText</code> nodes are normalized. 
     * Features to remove <code>DOMComment</code> and <code>DOMCDATASection</code> work.
     * The feature to normalize namespaces is implemented. This feature is called 
     * "namespaces" and is incorectly documented in the current WD.
     * @since DOM Level 3 
     *
     */
    virtual void                   normalizeDocument() = 0;


    /**
     * The configuration used when Document.normalizeDocument is invoked.
     * 
     * @return The <code>DOMConfiguration</code> from this <code>DOMDocument</code>
     *
     * Note that this is a partial implementation. Not all the required features are 
     * implemented and this is only used by normalizeDocument.
     * Currently <code>DOMAttr</code> and <code>DOMText</code> nodes are normalized. 
     * Features to remove <code>DOMComment</code> and <code>DOMCDATASection</code> work.
     * The feature to normalize namespaces is implemented. This feature is called 
     * "namespaces" and is incorectly documented in the current WD.
     *
     * <p><b>"Experimental - subject to change"</b></p>
     * @since DOM Level 3
     */
    virtual DOMConfiguration*      getDOMConfiguration() const = 0;

    //@}

    // -----------------------------------------------------------------------
    // Non-standard extension
    // -----------------------------------------------------------------------
    /** @name Non-standard extension */
    //@{
    /**
     * Non-standard extension
     *
     * Create a new entity.
     * @param name The name of the entity to instantiate
     *
     */
    virtual DOMEntity     *createEntity(const XMLCh *name) = 0;

    /**
     * Non-standard extension
     *
     * Create a DOMDocumentType node.
     * @return A <code>DOMDocumentType</code> that references the newly
     *  created DOMDocumentType node.
     *
     */
    virtual DOMDocumentType *createDocumentType(const XMLCh *name) = 0;

    /***
     * Provide default implementation to maintain source code compatibility
     ***/
    virtual DOMDocumentType* createDocumentType(const XMLCh *qName,
                                                const XMLCh*,  //publicId,
                                                const XMLCh*   //systemId
                                               )
    {
        return createDocumentType(qName);
    }

    /**
     * Non-standard extension.
     *
     * Create a Notation.
     * @param name The name of the notation to instantiate
     * @return A <code>DOMNotation</code> that references the newly
     *  created DOMNotation node.
     */
    virtual DOMNotation *createNotation(const XMLCh *name) = 0;

    /**
     * Non-standard extension.
     *
     * Creates an element of the given qualified name and
     * namespace URI, and also stores line/column number info.
     * Used by internally XSDXercesDOMParser during schema traversal.
     *
     * @see createElementNS(const XMLCh *namespaceURI, const XMLCh *qualifiedName)
     */
    virtual DOMElement         *createElementNS(const XMLCh *namespaceURI,
                                                  const XMLCh *qualifiedName,
                                                  const XMLSSize_t lineNum,
                                                  const XMLSSize_t columnNum) = 0;
    //@}

};

XERCES_CPP_NAMESPACE_END

#endif