Re: [xslt] saving output of xsltApplyStyleSheet ???



 >    buf = xmlOutputBufferCreateIO(xmlIOWrite, xmlIOClose, &xmlIOContext, enc);

Uhm, forgot to mention that xmlIOWrite and xmlIOClose are functions which
write to a memorybuffer (dscatf() is a resizing string concatenation
function):

static int xmlIOWrite(void *context, const char *buf, int len __attribute__((__unused__)))
{
  char  **result = (char **) context;

  dscatf(result, "%s", buf);
  return len; /* assume it worked */
}

static int xmlIOClose(void *context __attribute__((__unused__)))
{
  return 0;
}

                                                                   robert



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