summaryrefslogtreecommitdiffstats
path: root/WebCore/xml/XSLTProcessorQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/xml/XSLTProcessorQt.cpp')
-rw-r--r--WebCore/xml/XSLTProcessorQt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/xml/XSLTProcessorQt.cpp b/WebCore/xml/XSLTProcessorQt.cpp
index 29dbacf..b61025b 100644
--- a/WebCore/xml/XSLTProcessorQt.cpp
+++ b/WebCore/xml/XSLTProcessorQt.cpp
@@ -119,9 +119,12 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
RefPtr<XSLStyleSheet> stylesheet = m_stylesheet;
if (!stylesheet && m_stylesheetRootNode) {
Node* node = m_stylesheetRootNode.get();
- stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node,
+ stylesheet = XSLStyleSheet::createForXSLTProcessor(node->parentNode() ? node->parentNode() : node,
node->document()->url().string(),
node->document()->url()); // FIXME: Should we use baseURL here?
+
+ // According to Mozilla documentation, the node must be a Document node, an xsl:stylesheet or xsl:transform element.
+ // But we just use text content regardless of node type.
stylesheet->parseString(createMarkup(node));
}