On Mon, Mar 21, 2005 at 04:23:31PM -0800, Mark Vakoc wrote: > 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.
This is a good idea, but where, maybe in xsltApplyStylesheetInternal() ? Another possibility would be to force the interning at that level instead of generating an error, but I really didn't expect people would tweak those data . Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
