MCPcopy Create free account
hub / github.com/RetroShare/RetroShare / transform

Method transform

plugins/FeedReader/util/XMLWrapper.cpp:407–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

405}
406
407bool 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}

Callers 1

processXsltMethod · 0.80

Calls 2

getDocumentMethod · 0.80
attachMethod · 0.80

Tested by

no test coverage detected