[xslt] RFC: user changeable initial context




If you want to adopt, the following patch allows applying a stylesheet
against the source document with the initial context being something other
than the root node, i.e. pseudo

xmlDocPtr src = xmlParseFile(uri);
xsltStylesheetPtr style = xsltParseStylesheetFile(another_uri);
xsltTransformContextPtr ctxt  = xsltNewContextPtr(style,src);
ctxt->node = src->children->children->children; /* i.e. an initial context
position other than the root */
xmlDocPtr result = xsltApplyStylesheetUser(style,src,NULL,NULL,ctxt);


 <<transform.patch>> 

transform.patch



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