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, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. |
5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 if (!transformToString(sourceNode, resultMIMEType, resultString, resultEncod
ing)) | 133 if (!transformToString(sourceNode, resultMIMEType, resultString, resultEncod
ing)) |
134 return nullptr; | 134 return nullptr; |
135 return createFragmentForTransformToFragment(resultString, resultMIMEType, *o
utputDoc); | 135 return createFragmentForTransformToFragment(resultString, resultMIMEType, *o
utputDoc); |
136 } | 136 } |
137 | 137 |
138 void XSLTProcessor::setParameter(const String& /*namespaceURI*/, const String& l
ocalName, const String& value) | 138 void XSLTProcessor::setParameter(const String& /*namespaceURI*/, const String& l
ocalName, const String& value) |
139 { | 139 { |
140 // FIXME: namespace support? | 140 // FIXME: namespace support? |
141 // should make a QualifiedName here but we'd have to expose the impl | 141 // should make a QualifiedName here but we'd have to expose the impl |
| 142 if (localName.isNull() || value.isNull()) |
| 143 return; |
142 m_parameters.set(localName, value); | 144 m_parameters.set(localName, value); |
143 } | 145 } |
144 | 146 |
145 String XSLTProcessor::getParameter(const String& /*namespaceURI*/, const String&
localName) const | 147 String XSLTProcessor::getParameter(const String& /*namespaceURI*/, const String&
localName) const |
146 { | 148 { |
147 // FIXME: namespace support? | 149 // FIXME: namespace support? |
148 // should make a QualifiedName here but we'd have to expose the impl | 150 // should make a QualifiedName here but we'd have to expose the impl |
| 151 if (localName.isNull()) |
| 152 return String(); |
149 return m_parameters.get(localName); | 153 return m_parameters.get(localName); |
150 } | 154 } |
151 | 155 |
152 void XSLTProcessor::removeParameter(const String& /*namespaceURI*/, const String
& localName) | 156 void XSLTProcessor::removeParameter(const String& /*namespaceURI*/, const String
& localName) |
153 { | 157 { |
154 // FIXME: namespace support? | 158 // FIXME: namespace support? |
| 159 if (localName.isNull()) |
| 160 return; |
155 m_parameters.remove(localName); | 161 m_parameters.remove(localName); |
156 } | 162 } |
157 | 163 |
158 void XSLTProcessor::reset() | 164 void XSLTProcessor::reset() |
159 { | 165 { |
160 m_stylesheet.clear(); | 166 m_stylesheet.clear(); |
161 m_stylesheetRootNode.clear(); | 167 m_stylesheetRootNode.clear(); |
162 m_parameters.clear(); | 168 m_parameters.clear(); |
163 } | 169 } |
164 | 170 |
165 void XSLTProcessor::trace(Visitor* visitor) | 171 void XSLTProcessor::trace(Visitor* visitor) |
166 { | 172 { |
167 visitor->trace(m_stylesheet); | 173 visitor->trace(m_stylesheet); |
168 visitor->trace(m_stylesheetRootNode); | 174 visitor->trace(m_stylesheetRootNode); |
169 visitor->trace(m_document); | 175 visitor->trace(m_document); |
170 } | 176 } |
171 | 177 |
172 } // namespace blink | 178 } // namespace blink |
OLD | NEW |