1 /* 2 * This file is part of the XSL implementation. 3 * 4 * Copyright (C) 2009 Jakub Wieczorek <faw217 (at) gmail.com> 5 * 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. 10 * 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. 15 * 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. 20 */ 21 22 #include "config.h" 23 #include "XSLStyleSheet.h" 24 25 #if ENABLE(XSLT) 26 27 #include "DOMWindow.h" 28 #include "Document.h" 29 #include "Node.h" 30 #include "NotImplemented.h" 31 #include "XSLTProcessor.h" 32 #include "loader.h" 33 34 namespace WebCore { 35 36 XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded) 37 : StyleSheet(parentNode, originalURL, finalURL) 38 , m_ownerDocument(parentNode->document()) 39 , m_embedded(embedded) 40 { 41 } 42 43 XSLStyleSheet::~XSLStyleSheet() 44 { 45 } 46 47 bool XSLStyleSheet::isLoading() 48 { 49 notImplemented(); 50 return false; 51 } 52 53 void XSLStyleSheet::checkLoaded() 54 { 55 if (ownerNode()) 56 ownerNode()->sheetLoaded(); 57 } 58 59 void XSLStyleSheet::clearDocuments() 60 { 61 notImplemented(); 62 } 63 64 DocLoader* XSLStyleSheet::docLoader() 65 { 66 if (!m_ownerDocument) 67 return 0; 68 return m_ownerDocument->docLoader(); 69 } 70 71 bool XSLStyleSheet::parseString(const String& string, bool) 72 { 73 // FIXME: Fix QXmlQuery so that it allows compiling the stylesheet before setting the document 74 // to be transformed. This way we could not only check if the stylesheet is correct before using it 75 // but also turn XSLStyleSheet::sheetString() into XSLStyleSheet::query() that returns a QXmlQuery. 76 77 m_sheetString = string; 78 return !m_sheetString.isEmpty(); 79 } 80 81 void XSLStyleSheet::loadChildSheets() 82 { 83 notImplemented(); 84 } 85 86 void XSLStyleSheet::loadChildSheet(const String&) 87 { 88 notImplemented(); 89 } 90 91 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*) 92 { 93 notImplemented(); 94 } 95 96 void XSLStyleSheet::markAsProcessed() 97 { 98 notImplemented(); 99 } 100 101 } // namespace WebCore 102 103 #endif // ENABLE(XSLT) 104