| 405 | } |
| 406 | |
| 407 | bool XMLWrapper::transform(const XMLWrapper &style, XMLWrapper &result) |
| 408 | { |
| 409 | handleError(true, mLastErrorString); |
| 410 | |
| 411 | xmlDocPtr resultDoc = NULL; |
| 412 | |
| 413 | xsltStylesheetPtr stylesheet = xsltParseStylesheetDoc(style.getDocument()); |
| 414 | if (stylesheet) { |
| 415 | resultDoc = xsltApplyStylesheet(stylesheet, getDocument(), NULL); |
| 416 | stylesheet->doc = NULL; // xsltFreeStylesheet is freeing doc |
| 417 | xsltFreeStylesheet(stylesheet); |
| 418 | } |
| 419 | |
| 420 | result.attach(resultDoc); |
| 421 | |
| 422 | handleError(false, mLastErrorString); |
| 423 | |
| 424 | return resultDoc ? true : false; |
| 425 | } |
no test coverage detected