[xml] xsltParseStylesheetDoc documentation/resource ownership



Looking at the documentation at http://xmlsoft.org/XSLT/html/libxslt-xsltInternals.html#xsltParseStylesheetDoc I don’t see anything written about the ownership policy for the xmlDocPtr passed in.  My experimentation suggested that the xsltStylesheet takes ownership of the xmlDoc, and reading the code in xslt.c I see that xsltFreeStylesheet does call xmlFreeDoc(style->doc); which appears to confirm the experimental view.

 

Could/should this be documented in the documentation of xsltStylesheet and/or the documentation of the functions that take ownership of an xmlDoc when a stylesheet is created?  If yes, am I about to be asked for a patch? ;-)

 

I think there are probably other places where the documentation could make ownership policies clearer, but maybe I’m missing out on some blanket statement(s) that would cover many common cases?

 

-- James

 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]