• hausmann@webkit.org's avatar
    [Qt] Implement XSLT support with QtXmlPatterns. · 06b7e555
    hausmann@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=28303
    
    Patch by Jakub Wieczorek <faw217@gmail.com> on 2009-09-28
    Reviewed by Simon Hausmann.
    
    JavaScriptCore:
    
    * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
    
    WebCore:
    
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCoreSources.bkl:
    * dom/Document.cpp:
    (WebCore::Document::Document):
    (WebCore::Document::~Document):
    (WebCore::Document::setTransformSource):
    * dom/Document.h:
    (WebCore::Document::transformSource):
    * dom/TransformSource.h: Added.
    (WebCore::TransformSource::platformSource):
    * dom/TransformSourceLibxslt.cpp: Added.
    (WebCore::TransformSource::TransformSource): Wraps a libxml2 document.
    (WebCore::TransformSource::~TransformSource):
    * dom/TransformSourceQt.cpp: Added.
    (WebCore::TransformSource::TransformSource): Wraps a plain string.
    (WebCore::TransformSource::~TransformSource):
    * dom/XMLTokenizerLibxml2.cpp:
    (WebCore::XMLTokenizer::doEnd):
    * dom/XMLTokenizerQt.cpp:
    (WebCore::XMLTokenizer::doEnd):
    (WebCore::XMLTokenizer::parseProcessingInstruction):
    * xml/XSLStyleSheet.h:
    (WebCore::XSLStyleSheet::sheetString):
    * xml/XSLStyleSheetLibxslt.cpp:
    (WebCore::XSLStyleSheet::document):
    * xml/XSLStyleSheetQt.cpp: Added.
    * xml/XSLTProcessor.h:
    * xml/XSLTProcessorLibxslt.cpp:
    (WebCore::xmlDocPtrFromNode):
    * xml/XSLTProcessorQt.cpp: Added.
    (WebCore::XSLTMessageHandler::XSLTMessageHandler): A subclass of QAbstractMessageHandler.
    (WebCore::XSLTMessageHandler::handleMessage): Forwards all processor messages to the Console.
    (WebCore::XSLTProcessor::transformToString): Uses QXmlQuery.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    06b7e555
Document.cpp 144 KB