[xslt] Incremental ouptput



Hi,

I have modified my apache module (with the help of Philipp) for the incremental output. But now I have some encoding problems with latin1 characters and  .
They are trasformed in strange characters (utf 8?) and I don't know why.

This is the code I'm using:

.........
cur = xsltParseStylesheetFile((const xmlChar *)xslfilename);
	
res = xsltApplyStylesheet(cur, doc, NULL);
xslt_set_headers(r->headers_out,r->pool,cur);

r->content_type = ap_table_get(r->headers_out, "Content-Type");
r->content_encoding = ap_table_get(r->headers_out, "Content-Encoding");

xmlSetGenericErrorFunc(NULL, xslt_error);
xsltSetGenericErrorFunc(NULL, xslt_error);
output = xmlAllocOutputBuffer(NULL);
output->context = (void*)r;
output->writecallback = xsltOutputBufferWrite;
output->closecallback = NULL;  /* No close callback */
	
xsltSaveResultTo(output,res,cur);
xmlOutputBufferClose(output);

xmlSetGenericErrorFunc(NULL, NULL);
xsltSetGenericErrorFunc(NULL, NULL);

and

int xsltOutputBufferWrite(void * context, const char * buffer, int len){
	request_rec *rr = (request_rec*)context;
	ap_rwrite(buffer, len, rr);
	return len;
}

I'm probably making some encoding mistakes but I don't know what.

Can anyone help me?


Thanks


--Marco


-----------------------------------------------------

Salve, il messaggio che hai ricevuto
è stato inviato per mezzo del sistema
di web mail interfree. Se anche tu vuoi 
una casella di posta free visita il
sito http://club.interfree.it
Ti aspettiamo!

-----------------------------------------------------





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