19 #if !defined(XALAN_STYLESHEETHANDLER_HEADER_GUARD)
20 #define XALAN_STYLESHEETHANDLER_HEADER_GUARD
56 class ElemTemplateElement;
57 class ElemTextLiteral;
58 class ExtensionNSHandler;
59 class StylesheetConstructionContext;
86 initialize(MemoryManager& theManager);
105 return m_constructionContext.getMemoryManager();
136 const XMLCh*
const chars,
151 const XMLCh*
const chars,
179 const XMLCh*
const ch,
207 const XMLCh*
const chars,
226 virtual void processingInstruction (
const XMLCh*
const target,
const XMLCh*
const data);
234 virtual void comment(
const XMLCh*
const data);
242 virtual void entityReference(
const XMLCh*
const data);
274 virtual void setDocumentLocator(
const Locator*
const locator);
285 virtual void startDocument();
298 virtual void endDocument();
337 virtual void endElement(
const XMLCh*
const name);
344 virtual void resetDocument();
359 const XalanDOMChar* attrName,
376 const XalanDOMChar* elementName,
377 const XalanDOMChar* aname,
380 const Locator* locator,
394 const XalanDOMChar* elementName,
396 const Locator* locator,
404 const XalanDOMChar* name,
406 const Locator* locator);
413 const XalanDOMChar* name,
415 const Locator* locator);
422 enum { eElemEmptyAllocatorBlockSize = 10, eElemTextBlockSize = 10 };
425 StylesheetHandler(
const StylesheetHandler&);
428 operator=(
const StylesheetHandler&);
432 illegalAttributeError(
433 const XalanDOMChar* theElementName,
434 const XalanDOMChar* theAttributeName,
435 const Locator* theLocator)
const;
439 const XalanDOMChar* theMessage1,
440 const XalanDOMChar* theMessage2,
441 const Locator* theLocator)
const;
445 const XalanDOMChar* theMessage1,
446 const XalanDOMString& theMessage2,
447 const Locator* theLocator)
const;
451 const XalanDOMString& theMessage1,
452 const XalanDOMChar* theMessage2,
453 const Locator* theLocator)
const;
457 const XalanDOMString& theMessage1,
458 const XalanDOMString& theMessage2,
459 const Locator* theLocator)
const;
463 const XalanDOMChar* theMessage1,
464 const XalanDOMChar* theMessage2,
465 const Locator* theLocator)
const;
469 const XalanDOMChar* theMessage1,
470 const XalanDOMString& theMessage2,
471 const Locator* theLocator)
const;
474 const XalanDOMString& theMessage,
475 const Locator* theLocator)
const;
479 const XalanDOMString& theMessage,
480 const Locator* theLocator)
const;
493 processAccumulatedText();
496 processTopLevelElement(
497 const XalanDOMChar* name,
500 const Locator* locator,
501 bool& fPreserveSpace,
502 bool& fSpaceAttrProcessed);
506 const XalanDOMChar* name,
508 const Locator* locator,
509 bool& fPreserveSpace,
510 bool& fSpaceAttrProcessed);
513 processPreserveStripSpace(
514 const XalanDOMChar* name,
516 const Locator* locator,
520 appendChildElementToParent(
521 ElemTemplateElement* elem,
522 const Locator* locator);
525 appendChildElementToParent(
526 ElemTemplateElement* parent,
527 ElemTemplateElement* elem);
530 appendChildElementToParent(
531 ElemTemplateElement* parent,
532 ElemTemplateElement* elem,
533 const Locator* locator);
536 inExtensionElement()
const;
539 processExtensionElement(
540 const XalanDOMChar* name,
541 const XalanDOMString& localName,
543 const Locator* locator);
546 checkForOrAddVariableName(
547 const XalanQName& theVariableName,
548 const Locator* theLocator);
555 Stylesheet& m_stylesheet;
560 StylesheetConstructionContext& m_constructionContext;
565 XalanElemEmptyAllocator m_elemEmptyAllocator;
570 XalanElemTextAllocator m_elemTextAllocator;
575 ElemTemplateStackType m_elemStack;
582 ElemTextLiteralStackType m_whiteSpaceElems;
587 ElemTemplateElement* m_pTemplate;
589 class LastPoppedHolder
593 LastPoppedHolder(StylesheetHandler& theStylesheetHandler) :
594 m_stylesheetHandler(theStylesheetHandler),
613 return m_lastPopped == theRHS;
619 return m_lastPopped != theRHS;
623 operator=(ElemTemplateElement* theRHS)
625 if (theRHS != m_lastPopped)
629 m_lastPopped = theRHS;
634 swap(LastPoppedHolder& theOther)
636 ElemTemplateElement*
const theTemp = m_lastPopped;
638 m_lastPopped = theOther.m_lastPopped;
640 theOther.m_lastPopped = theTemp;
652 set(ElemTemplateElement* theNewElement)
654 if (theNewElement != m_lastPopped)
658 m_lastPopped = theNewElement;
664 operator=(
const LastPoppedHolder&);
666 LastPoppedHolder(
const LastPoppedHolder&);
673 StylesheetHandler& m_stylesheetHandler;
675 ElemTemplateElement* m_lastPopped;
678 friend class LastPoppedHolder;
683 LastPoppedHolder m_lastPopped;
694 bool m_foundStylesheet;
701 bool m_foundNotImport;
719 unsigned long m_locatorsPushed;
723 enum { eVariablesStackDefault = 20 };
725 QNameSetVectorType m_inScopeVariableNamesStack;
732 const XalanDOMChar* name,
734 const Locator* locator);
737 getNamespaceFromStack(
const XalanDOMChar* theName,
741 getNamespaceForPrefixFromStack(
const XalanDOMString& thePrefix)
const;
743 class PushPopIncludeState;
745 friend class StylesheetHandler::PushPopIncludeState;
747 class PushPopIncludeState
753 ~PushPopIncludeState();
763 LastPoppedHolder m_lastPopped;
765 const bool m_inTemplate;
767 const bool m_foundStylesheet;
771 const bool m_foundNotImport;
793 #endif // XALAN_STYLESHEETHANDLER_HEADER_GUARD