[xslt] FYI on string interning of XSLT transform mode/modeURI



Just an FYI for the list, a problem I found that was tricky to find.  

The latest (1.1.13) libxslt requires that the mode and mode uri of rhe
transform context be interned within hte transform context's dictionary.  I use
to do something along hte lines of:

1:  xsltTransformContextPtr ctxt = xsltNewTransformContext(....)
2:  ctxt->mode = BAD_CAST "test";
3:  xsltApplyStylesheetUser(....., ctxt);

The expected template would never run because libxslt is using pointer compares
without hte fallback to xmlStrEQual.  Line 2 needs to be something like:

ctxt->mode = xmlDictLookup(ctxt->dict, "test", -1);

Daniel, would it be possible to have some #IFDEFed debugging that could call
xmlDictOwns() for strings that *must* be interned in the transform dict to
verify their presence?  This was a tough one to find because of some sort of
stack corruption caused by it.





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