OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of the XSL implementation. | 2 * This file is part of the XSL implementation. |
3 * | 3 * |
4 * Copyright (C) 2004, 2007, 2008 Apple, Inc. All rights reserved. | 4 * Copyright (C) 2004, 2007, 2008 Apple, Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 class XSLTProcessor : public RefCountedWillBeGarbageCollectedFinalized<XSLTProce ssor>, public ScriptWrappable { | 42 class XSLTProcessor : public RefCountedWillBeGarbageCollectedFinalized<XSLTProce ssor>, public ScriptWrappable { |
43 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
44 public: | 44 public: |
45 static PassRefPtrWillBeRawPtr<XSLTProcessor> create(Document& document) | 45 static PassRefPtrWillBeRawPtr<XSLTProcessor> create(Document& document) |
46 { | 46 { |
47 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); | 47 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); |
48 return adoptRefWillBeNoop(new XSLTProcessor(document)); | 48 return adoptRefWillBeNoop(new XSLTProcessor(document)); |
49 } | 49 } |
50 ~XSLTProcessor(); | 50 ~XSLTProcessor(); |
51 | 51 |
52 void setXSLStyleSheet(PassRefPtrWillBeRawPtr<XSLStyleSheet> styleSheet) { m_ stylesheet = styleSheet; } | |
53 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding); | 52 bool transformToString(Node* source, String& resultMIMEType, String& resultS tring, String& resultEncoding); |
54 PassRefPtrWillBeRawPtr<Document> createDocumentFromSource(const String& sour ce, const String& sourceEncoding, const String& sourceMIMEType, Node* sourceNode , LocalFrame*); | |
55 | 53 |
56 // DOM methods | 54 // DOM methods |
57 void importStylesheet(PassRefPtrWillBeRawPtr<Node> style) | 55 void importStylesheet(PassRefPtrWillBeRawPtr<Node> style) |
58 { | 56 { |
59 if (style) | 57 if (style) |
60 m_stylesheetRootNode = style; | 58 m_stylesheetRootNode = style; |
61 } | 59 } |
62 PassRefPtrWillBeRawPtr<DocumentFragment> transformToFragment(Node* source, D ocument* ouputDoc); | 60 PassRefPtrWillBeRawPtr<DocumentFragment> transformToFragment(Node* source, D ocument* ouputDoc); |
63 PassRefPtrWillBeRawPtr<Document> transformToDocument(Node* source); | 61 PassRefPtrWillBeRawPtr<Document> transformToDocument(Node* source); |
64 | 62 |
(...skipping 12 matching lines...) Expand all Loading... | |
77 | 75 |
78 typedef HashMap<String, String> ParameterMap; | 76 typedef HashMap<String, String> ParameterMap; |
79 | 77 |
80 void trace(Visitor*); | 78 void trace(Visitor*); |
81 | 79 |
82 private: | 80 private: |
83 XSLTProcessor(Document& document) | 81 XSLTProcessor(Document& document) |
84 : m_document(&document) | 82 : m_document(&document) |
85 { } | 83 { } |
86 | 84 |
85 void setXSLStyleSheet(PassRefPtrWillBeRawPtr<XSLStyleSheet> styleSheet) { m_ stylesheet = styleSheet; } | |
tasak
2014/11/07 13:34:55
If it is not possible to deprecate external DTD, j
| |
86 PassRefPtrWillBeRawPtr<Document> createDocumentFromSource(const String& sour ce, const String& sourceEncoding, const String& sourceMIMEType, Node* sourceNode , LocalFrame*); | |
87 | |
87 RefPtrWillBeMember<XSLStyleSheet> m_stylesheet; | 88 RefPtrWillBeMember<XSLStyleSheet> m_stylesheet; |
88 RefPtrWillBeMember<Node> m_stylesheetRootNode; | 89 RefPtrWillBeMember<Node> m_stylesheetRootNode; |
89 RefPtrWillBeMember<Document> m_document; | 90 RefPtrWillBeMember<Document> m_document; |
90 ParameterMap m_parameters; | 91 ParameterMap m_parameters; |
91 }; | 92 }; |
92 | 93 |
93 } // namespace blink | 94 } // namespace blink |
94 | 95 |
95 #endif // XSLTProcessor_h | 96 #endif // XSLTProcessor_h |
OLD | NEW |