From: Peter B. <re...@f2...> - 2001-05-18 20:42:54
|
At 12:32 PM 5/18/01 -0700, you wrote: > > Finally hacked a working version, after adding better error handling to > > Alex's script :-) > >heh, post it! Add to form.php function xsl_error($parser, $code, $level, $errors) { echo "$parser [$code]: $level, <p>"; var_dump($errors); } and then remove: xslt_set_error_handler("xslt_error"); $processor = xslt_create(); and instead add $processor = xslt_create(); xslt_set_error_handler($processor, "xsl_error"); You'll want to comment out the xslt_set_error_handler after a while - it is really annoying output once everything is working :-) > > One of the problems was the encoding declaration - I used > > encoding="utf-8". I also removed the > > xmlns:fo="http://www.w3.org/1999/XSL/Format" reference and it seemed to > > work fine. > >The fo: is there for different reasons, and you're right, it won't effect >the current xsl. UTF, though I'm surprised by. What does utf-8 mean? I copied it from another XSLT script that worked for me, but don't understand a thing about it! >I'm willing to chock that up to a funky win php install. I haven't found any >installable version of php for win that didn't require a good deal of hand >tweaking and head scratching to get working. And upgrading is even more of a problem... I've stuck so many dlls in so many different places that I haven't the faintest idea which are doing the work and which I should leave alone :-) 'spect it's easy on Linux is it? >check out the "complex" example I posted earlier, as it appears to be >(gasp!) actually useful! > >the final xml output from the builder classes will be somewhat different >than that little hacked format (or at least at first) but I'm seriously >loving xslt. Same here. I'd love to rewrite my site using XSLT and phpcache or PearCache, but my free web hosting provider doesn't support Sablotron :-(( >I fixed a little rule in there this morning that (for a select) checks to >see if the next element is a select, and if so, prints a space - or if the >next element is something else, prints a br, or if nothing, ptints nothing. > >it's extremely groovy, and efficient. And just what I need for one of my scripts, if only it didn't rely on Sablotron being installed ;-) Peter. --oOo-- Narrow Gauge on the web - photos, directory and forums! http://www.narrow-gauge.co.uk --oOo-- Peter's web page - Scottish narrow gauge in 009 http://members.aol.com/reywob/ --oOo-- |