void startXSLTElement(const std::string& namespaceURI,
                        const std::string& localName,
                        const std::string& qName,
                        const SAX::Attributes<std::string>& atts)
  {
    if((localName == "import") || (localName == "include"))
    {
      include_stylesheet(namespaceURI, localName, qName, atts);
      return;
    } // if ...
    
    for(const ChildElement* c = allowedChildren; c->name != 0; ++c)
      if(c->name == localName)
      {
        context_.push(0,
                      c->createHandler(context_),
                      namespaceURI, 
                      localName, 
                      qName, 
                      atts);
        return;
      } // if ...

    oops(qName);
  } // startXSLTElement
Exemplo n.º 2
0
  virtual void endElement(const string_type& namespaceURI,
                          const string_type& localName,
                          const string_type& qName)
  {
    if(no_content_ &&
       (namespaceURI == StylesheetConstant<string_type, string_adaptor>::NamespaceURI))
    {
      no_content_ = false;
      if(localName == SC::include)
      {
        include_stylesheet(href_.back(), context_->precedence());
        href_.pop_back();
      } // if ...
      if(href_.empty())
        context_->parser().setContentHandler(*compiler_);
      return;
    } // if ...

    context_->parentHandler().endElement(namespaceURI,
                                         localName, 
                                         qName);
  } // endElement
Exemplo n.º 3
0
 void import_stylesheet(const ImportHref& import)
 {
   current_includes_ = import.includes;
   include_stylesheet(import.href, import.precedence);
 } // import_stylesheet