2 * This file is part of the XSL implementation.
4 * Copyright (C) 2009 Jakub Wieczorek <faw217@gmail.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #include "XSLStyleSheet.h"
27 #include "DOMWindow.h"
30 #include "NotImplemented.h"
31 #include "XSLTProcessor.h"
35 XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded)
36 : StyleSheet(parentNode, originalURL, finalURL)
37 , m_embedded(embedded)
41 XSLStyleSheet::~XSLStyleSheet()
45 bool XSLStyleSheet::isLoading()
51 void XSLStyleSheet::checkLoaded()
54 ownerNode()->sheetLoaded();
57 void XSLStyleSheet::clearDocuments()
62 CachedResourceLoader* XSLStyleSheet::cachedResourceLoader()
64 Document* document = ownerDocument();
67 return document->cachedResourceLoader();
70 bool XSLStyleSheet::parseString(const String& string, bool)
72 // FIXME: Fix QXmlQuery so that it allows compiling the stylesheet before setting the document
73 // to be transformed. This way we could not only check if the stylesheet is correct before using it
74 // but also turn XSLStyleSheet::sheetString() into XSLStyleSheet::query() that returns a QXmlQuery.
76 m_sheetString = string;
77 return !m_sheetString.isEmpty();
80 void XSLStyleSheet::loadChildSheets()
85 void XSLStyleSheet::loadChildSheet(const String&)
90 Document* XSLStyleSheet::ownerDocument()
92 Node* node = ownerNode();
93 return node ? node->document() : 0;
96 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*)
101 void XSLStyleSheet::markAsProcessed()
106 } // namespace WebCore
108 #endif // ENABLE(XSLT)