Xalan-C++ API Reference 1.12.0
DOMServices.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(DOMSERVICES_HEADER_GUARD_1357924680)
19#define DOMSERVICES_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
35
36
37
41
42
43
45
46
47
48class XalanDocument;
50
51
52
54{
55public:
56
65
74
75
76 // A dummy string to return when we need an emtpy string...
78
79
80 /**
81 * Initialize static data. Must be called before any
82 * other functions are called.
83 */
84 static void
85 initialize(MemoryManager& theManager);
86
87 /**
88 * Destroy static data. After thus function is called,
89 * no other functions can be called.
90 */
91 static void
93
94
95 /**
96 * Retrieves data for node
97 *
98 * @param node DOM node whose data is to be returned
99 * @param data a string to which the node's data will be appended
100 */
101 static void
103 const XalanNode& node,
104 XalanDOMString& data);
105
106 /**
107 * Retrieves data for node
108 *
109 * @param node DOM node whose data is to be returned
110 * @param context The current execution context
111 * @param data a string to which the node's data will be appended
112 */
113 static void
115 const XalanNode& node,
116 ExecutionContext& context,
117 XalanDOMString& data)
118 {
120 {
121 getNodeData(node, data);
122 }
123 else
124 {
125 doGetNodeData(node, context, data);
126 }
127 }
128
129
130
131 /**
132 * Retrieves data for node
133 *
134 * @param attribute DOM node whose data is to be returned
135 * @param data a string to which the node's data will be appended
136 */
137 static void
139 const XalanAttr& attribute,
140 XalanDOMString& data)
141 {
142 data.append(attribute.getNodeValue());
143 }
144
145
146
147 /**
148 * Retrieves data for node
149 *
150 * @param comment DOM node whose data is to be returned
151 * @param data a string to which the node's data will be appended
152 */
153 static void
155 const XalanComment& comment,
156 XalanDOMString& data)
157 {
158 data.append(comment.getData());
159 }
160
161 /**
162 * Retrieves data for node
163 *
164 * @param document DOM node whose data is to be returned
165 * @param data a string to which the node's data will be appended
166 */
167 static void
169 const XalanDocument& document,
170 XalanDOMString& data);
171
172 /**
173 * Retrieves data for node
174 *
175 * @param document The DOM node whose data is to be returned
176 * @param context The current execution context
177 * @param data a string to which the node's data will be appended
178 */
179 static void
181 const XalanDocument& document,
182 ExecutionContext& context,
183 XalanDOMString& data)
184 {
186 {
187 getNodeData(document, data);
188 }
189 else
190 {
191 doGetNodeData(document, context, data);
192 }
193 }
194
195 /**
196 * Retrieves data for node
197 *
198 * @param documentFragment The DOM node whose data is to be returned
199 * @param data a string to which the node's data will be appended
200 */
201 static void
203 const XalanDocumentFragment& documentFragment,
204 XalanDOMString& data);
205
206 /**
207 * Retrieves data for node
208 *
209 * @param documentFragment The DOM node whose data is to be returned
210 * @param context The current execution context
211 * @param data a string to which the node's data will be appended
212 */
213 static void
215 const XalanDocumentFragment& documentFragment,
216 ExecutionContext& context,
217 XalanDOMString& data)
218 {
220 {
221 getNodeData(documentFragment, data);
222 }
223 else
224 {
225 doGetNodeData(documentFragment, context, data);
226 }
227 }
228
229 /**
230 * Retrieves data for node
231 *
232 * @param element DOM node whose data is to be returned
233 * @param data a string to which the node's data will be appended
234 */
235 static void
237 const XalanElement& element,
238 XalanDOMString& data);
239
240 /**
241 * Retrieves data for node
242 *
243 * @param node DOM node whose data is to be returned
244 * @param context The current execution context
245 * @param data a string to which the node's data will be appended
246 */
247 static void
249 const XalanElement& element,
250 ExecutionContext& context,
251 XalanDOMString& data)
252 {
254 {
255 getNodeData(element, data);
256 }
257 else
258 {
259 doGetNodeData(element, context, data);
260 }
261 }
262
263 /**
264 * Retrieves data for node
265 *
266 * @param pi DOM node whose data is to be returned
267 * @param data a string to which the node's data will be appended
268 */
269 static void
272 XalanDOMString& data)
273 {
274 data.append(pi.getData());
275 }
276
277 /**
278 * Retrieves data for node
279 *
280 * @param node DOM node whose data is to be returned
281 * @param data a string to which the node's data will be appended
282 */
283 static void
285 const XalanText& text,
286 XalanDOMString& data)
287 {
288 data.append(text.getData());
289 }
290
291 /**
292 * Retrieves data for node
293 *
294 * @param text DOM node whose data is to be returned
295 * @param context The current execution context
296 * @param data a string to which the node's data will be appended
297 */
298 static void
300 const XalanText& text,
301 ExecutionContext& context,
302 XalanDOMString& data)
303 {
305 {
306 getNodeData(text, data);
307 }
308 else
309 {
310 doGetNodeData(text, context, data);
311 }
312 }
313
314 typedef void (FormatterListener::*MemberFunctionPtr)(const XMLCh* const, const FormatterListener::size_type);
315
316 /**
317 * Sends the data for a node to a FormatterListener
318 *
319 * @param node DOM node whose data is to be returned
320 * @param formatterListener the FormatterListener instance to receive the data
321 * @param function A pointer to the member function of FormatterListener to call
322 */
323 static void
325 const XalanNode& node,
326 FormatterListener& formatterListener,
327 MemberFunctionPtr function);
328
329 /**
330 * Sends the data for a node to a FormatterListener
331 *
332 * @param node DOM node whose data is to be returned
333 * @param context The current execution context
334 * @param formatterListener the FormatterListener instance to receive the data
335 * @param function A pointer to the member function of FormatterListener to call
336 */
337 static void
339 const XalanNode& node,
340 ExecutionContext& context,
341 FormatterListener& formatterListener,
342 MemberFunctionPtr function)
343 {
345 {
346 getNodeData(node, formatterListener, function);
347 }
348 else
349 {
350 doGetNodeData(node, context, formatterListener, function);
351 }
352 }
353
354 /**
355 * Sends the data for a node to a FormatterListener
356 *
357 * @param attribute DOM node whose data is to be returned
358 * @param formatterListener the FormatterListener instance to receive the data
359 * @param fRaw Whether or not the data should be sent raw.
360 */
361 static void
363 const XalanAttr& attribute,
364 FormatterListener& formatterListener,
365 MemberFunctionPtr function)
366 {
367 sendData(formatterListener, function, attribute.getNodeValue());
368 }
369
370 /**
371 * Sends the data for a node to a FormatterListener
372 *
373 * @param comment DOM node whose data is to be returned
374 * @param formatterListener the FormatterListener instance to receive the data
375 * @param fRaw Whether or not the data should be sent raw.
376 */
377 static void
379 const XalanComment& comment,
380 FormatterListener& formatterListener,
381 MemberFunctionPtr function)
382 {
383 sendData(formatterListener, function, comment.getData());
384 }
385
386 /**
387 * Sends the data for a node to a FormatterListener
388 *
389 * @param document DOM node whose data is to be returned
390 * @param formatterListener the FormatterListener instance to receive the data
391 * @param fRaw Whether or not the data should be sent raw.
392 */
393 static void
395 const XalanDocument& document,
396 FormatterListener& formatterListener,
397 MemberFunctionPtr function);
398
399 /**
400 * Sends the data for a node to a FormatterListener
401 *
402 * @param node DOM node whose data is to be returned
403 * @param context The current execution context
404 * @param formatterListener the FormatterListener instance to receive the data
405 * @param function A pointer to the member function of FormatterListener to call
406 */
407 static void
409 const XalanDocument& document,
410 ExecutionContext& context,
411 FormatterListener& formatterListener,
412 MemberFunctionPtr function)
413 {
415 {
416 getNodeData(document, formatterListener, function);
417 }
418 else
419 {
420 doGetNodeData(document, context, formatterListener, function);
421 }
422 }
423
424 /**
425 * Sends the data for a node to a FormatterListener
426 *
427 * @param documentFragment DOM node whose data is to be sent
428 * @param formatterListener the FormatterListener instance to receive the data
429 * @param fRaw Whether or not the data should be sent raw.
430 */
431 static void
433 const XalanDocumentFragment& documentFragment,
434 FormatterListener& formatterListener,
435 MemberFunctionPtr function);
436
437 /**
438 * Sends the data for a node to a FormatterListener
439 *
440 * @param documentFragment DOM node whose data is to be sent
441 * @param context The current execution context
442 * @param formatterListener the FormatterListener instance to receive the data
443 * @param fRaw Whether or not the data should be sent raw.
444 */
445 static void
447 const XalanDocumentFragment& documentFragment,
448 ExecutionContext& context,
449 FormatterListener& formatterListener,
450 MemberFunctionPtr function)
451 {
453 {
454 getNodeData(documentFragment, formatterListener, function);
455 }
456 else
457 {
458 doGetNodeData(documentFragment, context, formatterListener, function);
459 }
460 }
461
462 /**
463 * Sends the data for a node to a FormatterListener
464 *
465 * @param element DOM node whose data is to be returned
466 * @param formatterListener the FormatterListener instance to receive the data
467 * @param fRaw Whether or not the data should be sent raw.
468 */
469 static void
471 const XalanElement& element,
472 FormatterListener& formatterListener,
473 MemberFunctionPtr function);
474
475 /**
476 * Sends the data for a node to a FormatterListener
477 *
478 * @param node DOM node whose data is to be returned
479 * @param context The current execution context
480 * @param formatterListener the FormatterListener instance to receive the data
481 * @param function A pointer to the member function of FormatterListener to call
482 */
483 static void
485 const XalanElement& element,
486 ExecutionContext& context,
487 FormatterListener& formatterListener,
488 MemberFunctionPtr function)
489 {
491 {
492 getNodeData(element, formatterListener, function);
493 }
494 else
495 {
496 doGetNodeData(element, context, formatterListener, function);
497 }
498 }
499
500 /**
501 * Sends the data for a node to a FormatterListener
502 *
503 * @param pi DOM node whose data is to be returned
504 * @param formatterListener the FormatterListener instance to receive the data
505 * @param fRaw Whether or not the data should be sent raw.
506 */
507 static void
510 FormatterListener& formatterListener,
511 MemberFunctionPtr function)
512 {
513 sendData(formatterListener, function, pi.getData());
514 }
515
516 /**
517 * Sends the data for a node to a FormatterListener
518 *
519 * @param node DOM node whose data is to be returned
520 * @param formatterListener the FormatterListener instance to receive the data
521 * @param fRaw Whether or not the data should be sent raw.
522 */
523 static void
525 const XalanText& text,
526 FormatterListener& formatterListener,
527 MemberFunctionPtr function)
528 {
529 sendData(formatterListener, function, text.getData());
530 }
531
532 /**
533 * Sends the data for a node to a FormatterListener
534 *
535 * @param node DOM node whose data is to be returned
536 * @param context The current execution context
537 * @param formatterListener the FormatterListener instance to receive the data
538 * @param fRaw Whether or not the data should be sent raw.
539 */
540 static void
542 const XalanText& text,
543 ExecutionContext& context,
544 FormatterListener& formatterListener,
545 MemberFunctionPtr function)
546 {
548 {
549 getNodeData(text, formatterListener, function);
550 }
551 else
552 {
553 doGetNodeData(text, context, formatterListener, function);
554 }
555 }
556
557 /**
558 * Retrieve the name of the node, taking into
559 * account the differences between the DOM and
560 * XSLT data models.
561 *
562 * @param node DOM node whose name is returned
563 * @return name of the node
564 */
565 static const XalanDOMString&
567
568 /**
569 * Retrieve the name of the node, taking into
570 * account the differences between the DOM and
571 * XSLT data models.
572 *
573 * @param attr DOM attribute node whose name is returned
574 * @return name of the node
575 */
576 static const XalanDOMString&
578 {
579 const XalanDOMString& theName = attr.getNodeName();
580
581 if (startsWith(theName, s_XMLNamespaceWithSeparator) == true)
582 {
583 // Special case for namespace nodes...
584 return attr.getLocalName();
585 }
586 else if (equals(theName, s_XMLNamespace) == true)
587 {
588 return s_emptyString;
589 }
590 else
591 {
592 return theName;
593 }
594 }
595
596 /**
597 * Retrieve the name of the node, taking into
598 * account the differences between the DOM and
599 * XSLT data models.
600 *
601 * @param attr DOM element node whose name is returned
602 * @return name of the node
603 */
604 static const XalanDOMString&
606 {
607 return element.getNodeName();
608 }
609
610 /**
611 * Retrieve local name of node, taking into
612 * account the differences between the DOM and
613 * XSLT data models.
614 *
615 * @param node DOM node whose name is returned
616 * @return name of node without namespace
617 */
618 static const XalanDOMString&
620 {
621 const XalanDOMString& theLocalName = n.getLocalName();
622
623 if (theLocalName.empty() == false)
624 {
625 return theLocalName;
626 }
627 else
628 {
629 return n.getNodeName();
630 }
631 }
632
633 /**
634 * Retrieve the namespace of the node, taking into
635 * account the differences between the DOM and
636 * XSLT data models.
637 *
638 * @param node DOM node whose namespace is returned
639 * @return namespace of the node
640 */
641 static const XalanDOMString&
643
644 /**
645 * Determine whether or not an attribute node
646 * is declaring a namespace.
647 *
648 * @param node DOM node to check
649 * @return true if the attribute is declaring a namespace, false if not.
650 */
651 static bool
653 {
654 const XalanDOMString& theName = n.getNodeName();
655
656 return startsWith(theName, DOMServices::s_XMLNamespaceWithSeparator) == true ||
657 equals(theName, DOMServices::s_XMLNamespace) == true;
658 }
659
660 /**
661 * Retrieve the parent of a node. This function has to be implemented,
662 * because the DOM WG decided that attributes don't have parents.
663 *
664 * @param node child node
665 * @return parent node
666 */
667 static XalanNode*
669 {
670 if(node.getNodeType() == XalanNode::ATTRIBUTE_NODE)
671 {
672 return static_cast<const XalanAttr&>(node).getOwnerElement();
673 }
674 else
675 {
676 return node.getParentNode();
677 }
678 }
679
680 /**
681 * Retrieve the URI corresponding to a namespace prefix
682 *
683 * @param prefix prefix for a namespace
684 * @param namespaceContext DOM element representing the context for namespace
685 * @return URI corresponding to namespace
686 */
687 static const XalanDOMString*
689 const XalanDOMString& prefix,
690 const XalanElement& namespaceContext);
691
692 /**
693 * Retrieve the URI corresponding to a namespace prefix, using the supplied
694 * name, and PrefixResolver. The routine also returns the prefix.
695 *
696 * @param theName The name that contains the prefix
697 * @param thePrefixResolver The PrefixResolver to use
698 * @param isAttribute If true, special rules for attributes are used
699 * @param thePrefix The prefix
700 * @return URI corresponding to namespace
701 */
702 static const XalanDOMString*
704 const XalanDOMChar* theName,
705 const PrefixResolver& thePrefixResolver,
706 bool isAttribute,
707 XalanDOMString& thePrefix);
708
709 /**
710 * Determine if a node is after another node, in document order.
711 *
712 * @param node1 The first node
713 * @param node2 The second node
714 * @return true if node1 one is after node2, or false if it is not.
715 */
716 static bool
718 const XalanNode& node1,
719 const XalanNode& node2);
720
721 /**
722 * Determine if a node is after another node in the sibling list.
723 *
724 * @param parent The parent of the nodes.
725 * @param node1 The first node
726 * @param node2 The second node
727 * @return true if node1 one is after node2, or false if it is not.
728 */
729 static bool
731 const XalanNode& parent,
732 const XalanNode& child1,
733 const XalanNode& child2);
734
735private:
736
737 friend void
739 const XalanNode* child,
740 XalanDOMString& data);
741
742 friend void
744 const XalanNode* child,
745 ExecutionContext& executionContext,
746 XalanDOMString& data);
747
748 friend void
750 const XalanNode* child,
751 FormatterListener& formatterListener,
752 DOMServices::MemberFunctionPtr function);
753
754 /**
755 * Retrieves data for node
756 *
757 * @param node DOM node whose data is to be returned
758 * @param context The current execution context
759 * @param data a string to which the node's data will be appended
760 */
761 static void
762 doGetNodeData(
763 const XalanNode& node,
764 ExecutionContext& executionContext,
765 XalanDOMString& data);
766
767 /**
768 * Retrieves data for node
769 *
770 * @param document DOM node whose data is to be returned
771 * @param context The current execution context
772 * @param data a string to which the node's data will be appended
773 */
774 static void
775 doGetNodeData(
776 const XalanDocument& document,
777 ExecutionContext& context,
778 XalanDOMString& data);
779
780 /**
781 * Retrieves data for node
782 *
783 * @param documentFragment DOM node whose data is to be returned
784 * @param context The current execution context
785 * @param data a string to which the node's data will be appended
786 */
787 static void
788 doGetNodeData(
789 const XalanDocumentFragment& documentFragment,
790 ExecutionContext& context,
791 XalanDOMString& data);
792
793 /**
794 * Retrieves data for node
795 *
796 * @param element DOM node whose data is to be returned
797 * @param context The current execution context
798 * @param data a string to which the node's data will be appended
799 */
800 static void
801 doGetNodeData(
802 const XalanElement& element,
803 ExecutionContext& context,
804 XalanDOMString& data);
805
806 /**
807 * Retrieves data for node
808 *
809 * @param node DOM node whose data is to be returned
810 * @param context The current execution context
811 * @param data a string to which the node's data will be appended
812 */
813 static void
814 doGetNodeData(
815 const XalanText& text,
816 ExecutionContext& context,
817 XalanDOMString& data)
818 {
819 assert(context.hasPreserveOrStripSpaceConditions() == true);
820
821 if (context.shouldStripSourceNode(text) == false)
822 {
823 data.append(text.getData());
824 }
825 }
826
827 /**
828 * Sends the data for a node to a FormatterListener
829 *
830 * @param node DOM node whose data is to be returned
831 * @param context The current execution context
832 * @param formatterListener the FormatterListener instance to receive the data
833 * @param function A pointer to the member function of FormatterListener to call
834 */
835 static void
836 doGetNodeData(
837 const XalanNode& node,
838 ExecutionContext& context,
839 FormatterListener& formatterListener,
840 MemberFunctionPtr function);
841
842 /**
843 * Sends the data for a node to a FormatterListener
844 *
845 * @param node DOM node whose data is to be returned
846 * @param context The current execution context
847 * @param formatterListener the FormatterListener instance to receive the data
848 * @param function A pointer to the member function of FormatterListener to call
849 */
850 static void
851 doGetNodeData(
852 const XalanDocument& document,
853 ExecutionContext& context,
854 FormatterListener& formatterListener,
855 MemberFunctionPtr function);
856
857 /**
858 * Sends the data for a node to a FormatterListener
859 *
860 * @param documentFragment DOM node whose data is to be sent
861 * @param context The current execution context
862 * @param formatterListener the FormatterListener instance to receive the data
863 * @param fRaw Whether or not the data should be sent raw.
864 */
865 static void
866 doGetNodeData(
867 const XalanDocumentFragment& documentFragment,
868 ExecutionContext& context,
869 FormatterListener& formatterListener,
870 MemberFunctionPtr function);
871
872 /**
873 * Sends the data for a node to a FormatterListener
874 *
875 * @param node DOM node whose data is to be returned
876 * @param context The current execution context
877 * @param formatterListener the FormatterListener instance to receive the data
878 * @param function A pointer to the member function of FormatterListener to call
879 */
880 static void
881 doGetNodeData(
882 const XalanElement& element,
883 ExecutionContext& context,
884 FormatterListener& formatterListener,
885 MemberFunctionPtr function);
886
887 /**
888 * Sends the data for a node to a FormatterListener
889 *
890 * @param node DOM node whose data is to be returned
891 * @param context The current execution context
892 * @param formatterListener the FormatterListener instance to receive the data
893 * @param fRaw Whether or not the data should be sent raw.
894 */
895 static void
896 doGetNodeData(
897 const XalanText& text,
898 ExecutionContext& context,
899 FormatterListener& formatterListener,
900 MemberFunctionPtr function)
901 {
902 assert(context.hasPreserveOrStripSpaceConditions() == true);
903
904 if (context.shouldStripSourceNode(text) == false)
905 {
906 sendData(formatterListener, function, text.getData());
907 }
908 }
909
910 /**
911 * Utility function to send data to a FormatterListener
912 *
913 * @param formatterListener The FormatterListener instance.
914 * @param fRaw Whether or not the data should be sent raw.
915 * @param data The data to send.
916 */
917 static void
918 sendData(
919 FormatterListener& formatterListener,
920 MemberFunctionPtr function,
921 const XalanDOMString& data)
922 {
923 const XalanDOMString::size_type theLength =
924 data.length();
925
926 if (theLength != 0)
927 {
928 assert(theLength == FormatterListener::size_type(theLength));
929
930 (formatterListener.*function)(
931 data.c_str(),
932 FormatterListener::size_type(theLength));
933 }
934 }
935};
936
937
938
939}
940
941
942
943#endif // DOMSERVICES_HEADER_GUARD_1357924680
#define XALAN_DOMSUPPORT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
static void getNodeData(const XalanElement &element, ExecutionContext &context, XalanDOMString &data)
Retrieves data for node.
static const XalanDOMString & s_XMLNamespaceSeparatorString
static const XalanDOMString::size_type & s_XMLNamespaceWithSeparatorLength
static const XalanDOMString & s_XMLString
static void getNodeData(const XalanProcessingInstruction &pi, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static void getNodeData(const XalanDocument &document, ExecutionContext &context, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
friend void getChildData(const XalanNode *child, FormatterListener &formatterListener, DOMServices::MemberFunctionPtr function)
static void initialize(MemoryManager &theManager)
Initialize static data.
static void getNodeData(const XalanDocument &document, ExecutionContext &context, XalanDOMString &data)
Retrieves data for node.
static void getNodeData(const XalanElement &element, ExecutionContext &context, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString::size_type & s_XMLNamespacePrefixURILength
static void getNodeData(const XalanDocumentFragment &documentFragment, XalanDOMString &data)
Retrieves data for node.
static XalanNode * getParentOfNode(const XalanNode &node)
Retrieve the parent of a node.
static void getNodeData(const XalanDocumentFragment &documentFragment, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static void getNodeData(const XalanAttr &attribute, XalanDOMString &data)
Retrieves data for node.
static void getNodeData(const XalanComment &comment, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static void getNodeData(const XalanText &text, ExecutionContext &context, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static void getNodeData(const XalanElement &element, XalanDOMString &data)
Retrieves data for node.
static const XalanDOMString & s_XMLNamespacePrefixURI
static bool isNodeAfter(const XalanNode &node1, const XalanNode &node2)
Determine if a node is after another node, in document order.
static const XalanDOMString::size_type & s_XMLNamespaceURILength
static const XalanDOMString * getNamespaceForPrefix(const XalanDOMString &prefix, const XalanElement &namespaceContext)
Retrieve the URI corresponding to a namespace prefix.
static void getNodeData(const XalanDocument &document, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static void terminate()
Destroy static data.
static const XalanDOMString & getNameOfNode(const XalanAttr &attr)
Retrieve the name of the node, taking into account the differences between the DOM and XSLT data mode...
static void getNodeData(const XalanNode &node, XalanDOMString &data)
Retrieves data for node.
friend void getChildData(const XalanNode *child, ExecutionContext &executionContext, XalanDOMString &data)
static void getNodeData(const XalanDocumentFragment &documentFragment, ExecutionContext &context, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString * getNamespaceForPrefix(const XalanDOMChar *theName, const PrefixResolver &thePrefixResolver, bool isAttribute, XalanDOMString &thePrefix)
Retrieve the URI corresponding to a namespace prefix, using the supplied name, and PrefixResolver.
static void getNodeData(const XalanDocumentFragment &documentFragment, ExecutionContext &context, XalanDOMString &data)
Retrieves data for node.
static const XalanDOMString::size_type & s_XMLNamespaceLength
static void getNodeData(const XalanComment &comment, XalanDOMString &data)
Retrieves data for node.
friend void getChildData(const XalanNode *child, XalanDOMString &data)
static void getNodeData(const XalanNode &node, ExecutionContext &context, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString::size_type & s_XMLStringWithSeparatorLength
static const XalanDOMString & s_XMLNamespaceURI
static const XalanDOMString & s_XMLNamespace
static void getNodeData(const XalanText &text, ExecutionContext &context, XalanDOMString &data)
Retrieves data for node.
static void getNodeData(const XalanText &text, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString s_emptyString
static bool isNodeAfterSibling(const XalanNode &parent, const XalanNode &child1, const XalanNode &child2)
Determine if a node is after another node in the sibling list.
static void getNodeData(const XalanDocument &document, XalanDOMString &data)
Retrieves data for node.
static const XalanDOMString & getNameOfNode(const XalanNode &n)
Retrieve the name of the node, taking into account the differences between the DOM and XSLT data mode...
static const XalanDOMString & s_XMLNamespacePrefix
static const XalanDOMString & s_XMLStringWithSeparator
static void getNodeData(const XalanNode &node, ExecutionContext &context, XalanDOMString &data)
Retrieves data for node.
static void getNodeData(const XalanText &text, XalanDOMString &data)
Retrieves data for node.
static void getNodeData(const XalanNode &node, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString::size_type & s_XMLNamespacePrefixLength
static void getNodeData(const XalanElement &element, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static bool isNamespaceDeclaration(const XalanAttr &n)
Determine whether or not an attribute node is declaring a namespace.
static const XalanDOMString & s_XMLNamespaceWithSeparator
static void getNodeData(const XalanProcessingInstruction &pi, XalanDOMString &data)
Retrieves data for node.
static const XalanDOMString::size_type & s_XMLNamespaceSeparatorStringLength
static const XalanDOMString::size_type & s_XMLStringLength
static const XalanDOMString & getNamespaceOfNode(const XalanNode &n)
Retrieve the namespace of the node, taking into account the differences between the DOM and XSLT data...
static const XalanDOMString & getLocalNameOfNode(const XalanNode &n)
Retrieve local name of node, taking into account the differences between the DOM and XSLT data models...
static void getNodeData(const XalanAttr &attribute, FormatterListener &formatterListener, MemberFunctionPtr function)
Sends the data for a node to a FormatterListener.
static const XalanDOMString & getNameOfNode(const XalanElement &element)
Retrieve the name of the node, taking into account the differences between the DOM and XSLT data mode...
bool hasPreserveOrStripSpaceConditions() const
virtual bool shouldStripSourceNode(const XalanText &node)=0
Determine if a text node should be stripped from the source tree, as if it weren't there.
A SAX-based formatter interface for the XSL processor.
This class defines an interface for classes that resolve namespace prefixes to their URIs.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.
virtual const XalanDOMString & getData() const =0
Returns the character data of the node that implements this interface.
XalanDOMString & append(const XalanDOMString &theSource)
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual const XalanDOMString & getNodeName() const =0
Gets the name of this node, depending on its type.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanDOMString & getData() const =0
The content of this processing instruction.
virtual const XalanDOMString & getData() const =0
Returns the character data of the node that implements this interface.
size_t size_type
Definition XalanMap.hpp:46
startsWith(const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
Simulates the java String method startsWith().
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.