Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XercesElementBridge.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
19 #define XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
27 #if XERCES_VERSION_MAJOR >= 2
28 #include <xercesc/dom/deprecated/DOM_Element.hpp>
29 #else
30 #include <xercesc/dom/DOM_Element.hpp>
31 #endif
32 
33 
34 
36 
37 
38 
40 
41 
42 
46 
47 
48 
49 XALAN_CPP_NAMESPACE_BEGIN
50 
51 
52 
54 
55 
56 /**
57  * This class is deprecated.
58  *
59  * @deprecated This class is part of the deprecated Xerces DOM bridge.
60  */
62 {
63 public:
64 
65  typedef XERCES_CPP_NAMESPACE_QUALIFIER DOM_Element DOM_ElementType;
66 
68  const DOM_ElementType& theXercesElement,
69  const XercesBridgeNavigator& theNavigator);
70 
71  virtual
73 
74 
75  /**
76  * Gets the name of this node.
77  */
78  virtual const XalanDOMString&
79  getNodeName() const;
80 
81  /**
82  * Gets the value of this node, depending on its type.
83  */
84  virtual const XalanDOMString&
85  getNodeValue() const;
86 
87  /**
88  * An enum value representing the type of the underlying object.
89  */
90  virtual NodeType
91  getNodeType() const;
92 
93  /**
94  * Gets the parent of this node.
95  *
96  * All nodes, except <code>Document</code>,
97  * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
98  * However, if a node has just been created and not yet added to the tree,
99  * or if it has been removed from the tree, a <code>null</code> DOM_Node
100  * is returned.
101  */
102  virtual XalanNode*
103  getParentNode() const;
104 
105  /**
106  * Gets a <code>NodeList</code> that contains all children of this node.
107  *
108  * If there
109  * are no children, this is a <code>NodeList</code> containing no nodes.
110  * The content of the returned <code>NodeList</code> is "live" in the sense
111  * that, for instance, changes to the children of the node object that
112  * it was created from are immediately reflected in the nodes returned by
113  * the <code>NodeList</code> accessors; it is not a static snapshot of the
114  * content of the node. This is true for every <code>NodeList</code>,
115  * including the ones returned by the <code>getElementsByTagName</code>
116  * method.
117  */
118  virtual const XalanNodeList*
119  getChildNodes() const;
120 
121  /**
122  * Gets the first child of this node.
123  *
124  * If there is no such node, this returns <code>null</code>.
125  */
126  virtual XalanNode*
127  getFirstChild() const;
128 
129  /**
130  * Gets the last child of this node.
131  *
132  * If there is no such node, this returns <code>null</code>.
133  */
134  virtual XalanNode*
135  getLastChild() const;
136 
137  /**
138  * Gets the node immediately preceding this node.
139  *
140  * If there is no such node, this returns <code>null</code>.
141  */
142  virtual XalanNode*
143  getPreviousSibling() const;
144 
145  /**
146  * Gets the node immediately following this node.
147  *
148  * If there is no such node, this returns <code>null</code>.
149  */
150  virtual XalanNode*
151  getNextSibling() const;
152 
153  /**
154  * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
155  * is an <code>Element</code>) or <code>null</code> otherwise.
156  */
157  virtual const XalanNamedNodeMap*
158  getAttributes() const;
159 
160  /**
161  * Gets the <code>DOM_Document</code> object associated with this node.
162  *
163  * This is also
164  * the <code>DOM_Document</code> object used to create new nodes. When this
165  * node is a <code>DOM_Document</code> or a <code>DOM_DocumentType</code>
166  * which is not used with any <code>DOM_Document</code> yet, this is
167  * <code>null</code>.
168  */
169  virtual XalanDocument*
170  getOwnerDocument() const;
171 
172  //@}
173  /** @name Cloning function. */
174  //@{
175 
176  /**
177  * Returns a duplicate of this node.
178  *
179  * This function serves as a generic copy constructor for nodes.
180  *
181  * The duplicate node has no parent (
182  * <code>parentNode</code> returns <code>null</code>.).
183  * <br>Cloning an <code>Element</code> copies all attributes and their
184  * values, including those generated by the XML processor to represent
185  * defaulted attributes, but this method does not copy any text it contains
186  * unless it is a deep clone, since the text is contained in a child
187  * <code>Text</code> node. Cloning any other type of node simply returns a
188  * copy of this node.
189  * @param deep If <code>true</code>, recursively clone the subtree under the
190  * specified node; if <code>false</code>, clone only the node itself (and
191  * its attributes, if it is an <code>Element</code>).
192  * @return The duplicate node.
193  */
194 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
195  virtual XalanNode*
196 #else
197  virtual XercesElementBridge*
198 #endif
199  cloneNode(bool deep) const;
200 
201  //@}
202  /** @name Functions to modify the DOM Node. */
203  //@{
204 
205  /**
206  * Inserts the node <code>newChild</code> before the existing child node
207  * <code>refChild</code>.
208  *
209  * If <code>refChild</code> is <code>null</code>,
210  * insert <code>newChild</code> at the end of the list of children.
211  * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
212  * all of its children are inserted, in the same order, before
213  * <code>refChild</code>. If the <code>newChild</code> is already in the
214  * tree, it is first removed. Note that a <code>DOM_Node</code> that
215  * has never been assigned to refer to an actual node is == null.
216  * @param newChild The node to insert.
217  * @param refChild The reference node, i.e., the node before which the new
218  * node must be inserted.
219  * @return The node being inserted.
220  */
221  virtual XalanNode*
222  insertBefore(
223  XalanNode* newChild,
224  XalanNode* refChild);
225 
226  /**
227  * Replaces the child node <code>oldChild</code> with <code>newChild</code>
228  * in the list of children, and returns the <code>oldChild</code> node.
229  *
230  * If <CODE>newChild</CODE> is a <CODE>DOM_DocumentFragment</CODE> object,
231  * <CODE>oldChild</CODE> is replaced by all of the <CODE>DOM_DocumentFragment</CODE>
232  * children, which are inserted in the same order.
233  *
234  * If the <code>newChild</code> is already in the tree, it is first removed.
235  * @param newChild The new node to put in the child list.
236  * @param oldChild The node being replaced in the list.
237  * @return The node replaced.
238  */
239  virtual XalanNode*
240  replaceChild(
241  XalanNode* newChild,
242  XalanNode* oldChild);
243 
244  /**
245  * Removes the child node indicated by <code>oldChild</code> from the list
246  * of children, and returns it.
247  *
248  * @param oldChild The node being removed.
249  * @return The node removed.
250  */
251  virtual XalanNode*
252  removeChild(XalanNode* oldChild);
253 
254  /**
255  * Adds the node <code>newChild</code> to the end of the list of children of
256  * this node.
257  *
258  * If the <code>newChild</code> is already in the tree, it is
259  * first removed.
260  * @param newChild The node to add.If it is a <code>DocumentFragment</code>
261  * object, the entire contents of the document fragment are moved into
262  * the child list of this node
263  * @return The node added.
264  */
265  virtual XalanNode*
266  appendChild(XalanNode* newChild);
267 
268  //@}
269  /** @name Query functions. */
270  //@{
271 
272  /**
273  * This is a convenience method to allow easy determination of whether a
274  * node has any children.
275  *
276  * @return <code>true</code> if the node has any children,
277  * <code>false</code> if the node has no children.
278  */
279  virtual bool
280  hasChildNodes() const;
281 
282 
283  //@}
284  /** @name Set functions. */
285  //@{
286 
287 
288  /**
289  * Sets the value of the node.
290  *
291  * Any node which can have a nodeValue (@see getNodeValue) will
292  * also accept requests to set it to a string. The exact response to
293  * this varies from node to node -- Attribute, for example, stores
294  * its values in its children and has to replace them with a new Text
295  * holding the replacement value.
296  *
297  * For most types of Node, value is null and attempting to set it
298  * will throw DOMException(NO_MODIFICATION_ALLOWED_ERR). This will
299  * also be thrown if the node is read-only.
300  */
301  virtual void
302  setNodeValue(const XalanDOMString& nodeValue);
303 
304  //@}
305  /** @name Functions introduced in DOM Level 2. */
306  //@{
307 
308  /**
309  * Puts all <CODE>DOM_Text</CODE>
310  * nodes in the full depth of the sub-tree underneath this <CODE>DOM_Node</CODE>,
311  * including attribute nodes, into a "normal" form where only markup (e.g.,
312  * tags, comments, processing instructions, CDATA sections, and entity
313  * references) separates <CODE>DOM_Text</CODE>
314  * nodes, i.e., there are no adjacent <CODE>DOM_Text</CODE>
315  * nodes. This can be used to ensure that the DOM view of a document is the
316  * same as if it were saved and re-loaded, and is useful when operations
317  * (such as XPointer lookups) that depend on a particular document tree
318  * structure are to be used.
319  * <P><B>Note:</B> In cases where the document contains <CODE>DOM_CDATASections</CODE>,
320  * the normalize operation alone may not be sufficient, since XPointers do
321  * not differentiate between <CODE>DOM_Text</CODE>
322  * nodes and <CODE>DOM_CDATASection</CODE> nodes.</P>
323  */
324  virtual void
325  normalize();
326 
327  /**
328  * Tests whether the DOM implementation implements a specific
329  * feature and that feature is supported by this node.
330  * @param feature The string of the feature to test. This is the same
331  * name as what can be passed to the method <code>hasFeature</code> on
332  * <code>DOMImplementation</code>.
333  * @param version This is the version number of the feature to test. In
334  * Level 2, version 1, this is the string "2.0". If the version is not
335  * specified, supporting any version of the feature will cause the
336  * method to return <code>true</code>.
337  * @return Returns <code>true</code> if the specified feature is supported
338  * on this node, <code>false</code> otherwise.
339  */
340  virtual bool
341  isSupported(
342  const XalanDOMString& feature,
343  const XalanDOMString& version) const;
344 
345  /**
346  * Get the <em>namespace URI</em> of
347  * this node, or <code>null</code> if it is unspecified.
348  * <p>
349  * This is not a computed value that is the result of a namespace lookup
350  * based on an examination of the namespace declarations in scope. It is
351  * merely the namespace URI given at creation time.
352  * <p>
353  * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
354  * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
355  * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
356  * interface, this is always <CODE>null</CODE>.
357  */
358  virtual const XalanDOMString&
359  getNamespaceURI() const;
360 
361  /**
362  * Get the <em>namespace prefix</em>
363  * of this node, or <code>null</code> if it is unspecified.
364  */
365  virtual const XalanDOMString&
366  getPrefix() const;
367 
368  /**
369  * Returns the local part of the <em>qualified name</em> of this node.
370  * <p>
371  * For nodes created with a DOM Level 1 method, such as
372  * <code>createElement</code> from the <code>DOM_Document</code> interface,
373  * it is null.
374  */
375  virtual const XalanDOMString&
376  getLocalName() const;
377 
378  /**
379  * Set the <em>namespace prefix</em> of this node.
380  * <p>
381  * Note that setting this attribute, when permitted, changes
382  * the <CODE>nodeName</CODE> attribute, which holds the <EM>qualified
383  * name</EM>, as well as the <CODE>tagName</CODE> and <CODE>name</CODE>
384  * attributes of the <CODE>DOM_Element</CODE> and <CODE>DOM_Attr</CODE>
385  * interfaces, when applicable.
386  * <p>
387  * Note also that changing the prefix of an
388  * attribute, that is known to have a default value, does not make a new
389  * attribute with the default value and the original prefix appear, since the
390  * <CODE>namespaceURI</CODE> and <CODE>localName</CODE> do not change.
391  *
392  * @param prefix The prefix of this node.
393  * @exception DOMException
394  * INVALID_CHARACTER_ERR: Raised if the specified prefix contains
395  * an illegal character.
396  * <br>
397  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
398  * <br>
399  * NAMESPACE_ERR: Raised if the specified <CODE>prefix</CODE> is
400  * malformed, if the specified prefix is "xml" and the
401  * <CODE>namespaceURI</CODE> of this node is different from
402  * "http://www.w3.org/XML/1998/namespace", if specified prefix is
403  * "xmlns" and the <CODE>namespaceURI</CODE> is neither
404  * <CODE>null</CODE> nor an empty string, or if the
405  * <CODE>localName</CODE> is <CODE>null</CODE>.
406  */
407  virtual void
408  setPrefix(const XalanDOMString& prefix);
409 
410  virtual bool
411  isIndexed() const;
412 
413  virtual IndexType
414  getIndex() const;
415 
416  //@}
417 
418  // These interfaces are inherited from XalanElement...
419 
420  /**
421  * The name of the element.
422  *
423  * For example, in: &lt;elementExample
424  * id="demo"&gt; ... &lt;/elementExample&gt; , <code>tagName</code> has
425  * the value <code>"elementExample"</code>. Note that this is
426  * case-preserving in XML, as are all of the operations of the DOM.
427  */
428  virtual const XalanDOMString&
429  getTagName() const;
430 
431  /**
432  * Retrieves an attribute value by name.
433  *
434  * @param name The name of the attribute to retrieve.
435  * @return The <code>DOM_Attr</code> value as a string, or the empty string if
436  * that attribute does not have a specified or default value.
437  */
438  virtual const XalanDOMString&
439  getAttribute(const XalanDOMString& name) const;
440 
441  /**
442  * Retrieves an <code>DOM_Attr</code> node by name.
443  *
444  * @param name The name (<CODE>nodeName</CODE>) of the attribute to retrieve.
445  * @return The <code>DOM_Attr</code> node with the specified name (<CODE>nodeName</CODE>) or
446  * <code>null</code> if there is no such attribute.
447  */
448  virtual XalanAttr*
449  getAttributeNode(const XalanDOMString& name) const;
450 
451  /**
452  * Returns a <code>NodeList</code> of all descendant elements with a given
453  * tag name, in the order in which they would be encountered in a preorder
454  * traversal of the <code>DOM_Element</code> tree. Caller is
455  * responsible for deleting the XalanNodeList instance.
456  *
457  * @param name The name of the tag to match on. The special value "*"
458  * matches all tags.
459  * @return A list of matching <code>DOM_Element</code> nodes.
460  */
461  virtual XalanNodeList*
462  getElementsByTagName(const XalanDOMString& name) const;
463 
464  //@}
465  /** @name Set functions. */
466  //@{
467 
468  /**
469  * Adds a new attribute.
470  *
471  * If an attribute with that name is already present
472  * in the element, its value is changed to be that of the value parameter.
473  * This value is a simple string, it is not parsed as it is being set. So
474  * any markup (such as syntax to be recognized as an entity reference) is
475  * treated as literal text, and needs to be appropriately escaped by the
476  * implementation when it is written out. In order to assign an attribute
477  * value that contains entity references, the user must create an
478  * <code>DOM_Attr</code> node plus any <code>Text</code> and
479  * <code>EntityReference</code> nodes, build the appropriate subtree, and
480  * use <code>setAttributeNode</code> to assign it as the value of an
481  * attribute.
482  * @param name The name of the attribute to create or alter.
483  * @param value Value to set in string form.
484  * @exception DOMException
485  * INVALID_CHARACTER_ERR: Raised if the specified name contains an
486  * illegal character.
487  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
488  */
489  virtual void
490  setAttribute(
491  const XalanDOMString& name,
492  const XalanDOMString& value);
493 
494  /**
495  * Adds a new attribute.
496  *
497  * If an attribute with that name (<CODE>nodeName</CODE>) is already present
498  * in the element, it is replaced by the new one.
499  * @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
500  * @return If the <code>newAttr</code> attribute replaces an existing
501  * attribute, the replaced
502  * <code>DOM_Attr</code> node is returned, otherwise <code>null</code> is
503  * returned.
504  * @exception DOMException
505  * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
506  * different document than the one that created the element.
507  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
508  * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
509  * attribute of another <code>DOM_Element</code> object. The DOM user must
510  * explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
511  * elements.
512  */
513  virtual XalanAttr*
514  setAttributeNode(XalanAttr* newAttr);
515 
516  //@}
517  /** @name Functions which modify the Element. */
518  //@{
519 
520  /**
521  * Removes the specified attribute node.
522  * If the removed <CODE>DOM_Attr</CODE>
523  * has a default value it is immediately replaced. The replacing attribute
524  * has the same namespace URI and local name, as well as the original prefix,
525  * when applicable.
526  *
527  * @param oldAttr The <code>DOM_Attr</code> node to remove from the attribute
528  * list.
529  * @return The <code>DOM_Attr</code> node that was removed.
530  * @exception DOMException
531  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
532  * <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute
533  * of the element.
534  */
535  virtual XalanAttr*
536  removeAttributeNode(XalanAttr* oldAttr);
537 
538  /**
539  * Removes an attribute by name.
540  *
541  * If the removed attribute
542  * is known to have a default value, an attribute immediately appears
543  * containing the default value as well as the corresponding namespace URI,
544  * local name, and prefix when applicable.<BR>To remove an attribute by local
545  * name and namespace URI, use the <CODE>removeAttributeNS</CODE> method.
546  * @param name The name of the attribute to remove.
547  * @exception DOMException
548  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
549  */
550  virtual void
551  removeAttribute(const XalanDOMString& name);
552 
553  //@}
554  /** @name Functions introduced in DOM Level 2. */
555  //@{
556 
557  /**
558  * Retrieves an attribute value by local name and namespace URI.
559  *
560  * @param namespaceURI The <em>namespace URI</em> of
561  * the attribute to retrieve.
562  * @param localName The <em>local name</em> of the
563  * attribute to retrieve.
564  * @return The <code>DOM_Attr</code> value as a string, or an empty string if
565  * that attribute does not have a specified or default value.
566  */
567  virtual const XalanDOMString&
568  getAttributeNS(
569  const XalanDOMString& namespaceURI,
570  const XalanDOMString& localName) const;
571 
572  /**
573  * Adds a new attribute. If the given
574  * <CODE>namespaceURI</CODE> is <CODE>null</CODE> or an empty string and the
575  * <CODE>qualifiedName</CODE> has a prefix that is "xml", the new attribute
576  * is bound to the predefined namespace
577  * "http://www.w3.org/XML/1998/namespace".
578  * If an attribute with the same local name and namespace URI is already
579  * present on the element, its prefix is changed to be the prefix part of the
580  * <CODE>qualifiedName</CODE>, and its value is changed to be the
581  * <CODE>value</CODE> parameter.
582  * This value is a simple string, it is
583  * not parsed as it is being set. So any markup (such as syntax to be
584  * recognized as an entity reference) is treated as literal text, and
585  * needs to be appropriately escaped by the implementation when it is
586  * written out. In order to assign an attribute value that contains entity
587  * references, the user must create a <code>DOM_Attr</code> node plus any
588  * <code>DOM_Text</code> and <code>DOM_EntityReference</code> nodes, build the
589  * appropriate subtree, and use <code>setAttributeNodeNS</code> or
590  * <code>setAttributeNode</code> to assign it as the value of an
591  * attribute.
592  * @param namespaceURI The <em>namespace URI</em> of
593  * the attribute to create or alter.
594  * @param localName The <em>local name</em> of the
595  * attribute to create or alter.
596  * @param value The value to set in string form.
597  * @exception DOMException
598  * INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an
599  * illegal character.
600  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
601  * <br>
602  * NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
603  * malformed, if the <CODE>qualifiedName</CODE> has a prefix that is
604  * "xml" and the <CODE>namespaceURI</CODE> is neither <CODE>null</CODE>
605  * nor an empty string nor "http://www.w3.org/XML/1998/namespace", or
606  * if the <CODE>qualifiedName</CODE> has a prefix that is "xmlns" but
607  * the <CODE>namespaceURI</CODE> is neither <CODE>null</CODE> nor an
608  * empty string, or if if the <CODE>qualifiedName</CODE> has a prefix
609  * different from "xml" and "xmlns" and the <CODE>namespaceURI</CODE>
610  * is <CODE>null</CODE> or an empty string.
611  */
612  virtual void
613  setAttributeNS(
614  const XalanDOMString& namespaceURI,
615  const XalanDOMString& qualifiedName,
616  const XalanDOMString& value);
617 
618  /**
619  * Removes an attribute by local name and namespace URI. If the
620  * removed attribute has a default value it is immediately replaced.
621  * The replacing attribute has the same namespace URI and local name, as well as
622  * the original prefix.<BR>HTML-only DOM implementations do not need to
623  * implement this method.
624  *
625  * @param namespaceURI The <em>namespace URI</em> of
626  * the attribute to remove.
627  * @param localName The <em>local name</em> of the
628  * attribute to remove.
629  * @exception DOMException
630  * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
631  */
632  virtual void
633  removeAttributeNS(
634  const XalanDOMString& namespaceURI,
635  const XalanDOMString& localName);
636 
637  /**
638  * Retrieves an <code>DOM_Attr</code> node by local name and namespace URI.
639  *
640  * @param namespaceURI The <em>namespace URI</em> of
641  * the attribute to retrieve.
642  * @param localName The <em>local name</em> of the
643  * attribute to retrieve.
644  * @return The <code>DOM_Attr</code> node with the specified attribute local
645  * name and namespace URI or <code>null</code> if there is no such attribute.
646  */
647  virtual XalanAttr*
648  getAttributeNodeNS(
649  const XalanDOMString& namespaceURI,
650  const XalanDOMString& localName) const;
651 
652  /**
653  * Adds a new attribute.
654  *
655  * If an attribute with that local name and namespace URI is already present
656  * in the element, it is replaced by the new one.
657  * @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
658  * @return If the <code>newAttr</code> attribute replaces an existing
659  * attribute with the same <em>local name</em> and <em>namespace URI</em>,
660  * the replaced <code>DOM_Attr</code> node is
661  * returned, otherwise <code>null</code> is returned.
662  * @exception DOMException
663  * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
664  * different document than the one that created the element.
665  * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
666  * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
667  * attribute of another <code>DOM_Element</code> object. The DOM user must
668  * explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
669  * elements.
670  */
671  virtual XalanAttr*
672  setAttributeNodeNS(XalanAttr* newAttr);
673 
674  /**
675  * Returns a <code>DOM_NodeList</code> of all the <code>DOM_Element</code>s
676  * with a given local name and namespace URI in the order in which they
677  * would be encountered in a preorder traversal of the
678  * <code>DOM_Document</code> tree, starting from this node. Caller is
679  * responsible for deleting the XalanNodeList instance.
680  *
681  * @param namespaceURI The <em>namespace URI</em> of
682  * the elements to match on. The special value "*" matches all
683  * namespaces.
684  * @param localName The <em>local name</em> of the
685  * elements to match on. The special value "*" matches all local names.
686  * @return A new <code>DOM_NodeList</code> object containing all the matched
687  * <code>Element</code>s.
688  */
689  virtual XalanNodeList*
690  getElementsByTagNameNS(
691  const XalanDOMString& namespaceURI,
692  const XalanDOMString& localName) const;
693 
694  /**
695  * Get the Xerces node this instance represent.
696  *
697  * @return The Xerces node
698  */
699  DOM_ElementType
701  {
702  return m_xercesNode;
703  }
704 
705  //@}
706 
707 private:
708 
709  // Not implemented...
710  XercesElementBridge(const XercesElementBridge& theSource);
711 
712  XalanNode&
713  operator=(const XalanNode& theSource);
714 
715  bool
716  operator==(const XercesElementBridge& theRHS) const;
717 
718  // Data members...
719  XercesDOM_ElementHack m_xercesNode;
720 
721  const XercesBridgeNavigator& m_navigator;
722 
723  XercesNodeListBridge m_children;
724 
725  XercesNamedNodeMapBridge m_attributes;
726 };
727 
728 
729 
730 XALAN_CPP_NAMESPACE_END
731 
732 
733 
734 #endif // !defined(XERCESELEMENTBRIDGE_HEADER_GUARD_1357924680)
XERCES_CPP_NAMESPACE_QUALIFIER DOM_Element DOM_ElementType
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
This class is deprecated.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
#define XALAN_XERCESPARSERLIAISON_EXPORT
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanDOMString & getTagName() const =0
The name of the element.
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise...
This class is deprecated.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.
bool operator==(const XalanElement &theRHS) const
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual IndexType getIndex() const =0
Get the node&#39;s index.
XalanElement & operator=(const XalanElement &theSource)
unsigned long IndexType
Definition: XalanNode.hpp:64
This class is deprecated.
DOM_ElementType getXercesNode() const
Get the Xerces node this instance represent.
This class is deprecated.

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo