Sounds like the best course would be to ditch Sablotron as your processor, it really doesn't hold a candle to LibXML/LibXSLT anyhow... Assuming you CAN use the later, you should!
On Tuesday 26 November 2002 07:49 am, Martin Bahlinger wrote: > Matt Sergeant wrote: > >>However, if I have a xsp file which generates me proper > >>xml output and now try to transform it with > >>Apache::AxKit::Language::Sablot using a broken xsl stylesheet - then > >>AxKit delivers the rax xsp file to the client. This may be particularly > >>bad, when using e.g. the ESQL taglib and hence stored some database > >>password in your xsp file. > > > > Hmm, that's bad. I would have thought Sablot would throw an exception if > > an error occurred. It certainly should, and then you'll get your > > ErrorStylesheet instead. If not, that's a bug that needs fixing. > > Sablot throws an exception if it cannot find the requested Stylesheet. > But it does not throw an exception if you have a broken Stylesheet. > > > Do you have a simple test case so the bug can be fixed? > > Hmm, simple, try the follwing example. Modifying the xml file will > result in an Exception, as expected. But if you remove e.g. <html> in > the Stylesheet,the raw xml file is delivered. > > > my xml test file: > ====================================================== > <?xml version="1.0"?> > <?xml-stylesheet href="test.xsl" type="text/xsl"?> > > <mytest> > <item>foo</item> > <item>bar</item> > </mytest> > ====================================================== > > apply following xsl: > ====================================================== > <?xml version="1.0" encoding="iso-8859-1"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:output method="html" indent="yes"/> > > <xsl:template match="/"> > <html> > <body> > <xsl:apply-templates/> > </body> > </html> > </xsl:template> > > <xsl:template match="mytest/item"> > <xsl:value-of select="."/><br/> > </xsl:template> > > </xsl:stylesheet> > ====================================================== > > in my httpd.conf: > ====================================================== > AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot > ====================================================== > > error.log after modifying the xsl: > ====================================================== > [Tue Nov 26 13:41:03 2002] [warn] [client 129.13.95.158] [AxKit] styles: > Apache::AxKit::Language::Sablot(test.xsl) > [Tue Nov 26 13:41:03 2002] [warn] [client 129.13.95.158] [AxKit] about > to execute: Apache::AxKit::Language::Sablot::handler > [Tue Nov 26 13:41:03 2002] [error] [client 129.13.95.158] [AxKit] > [Sablotron] [2] Error: msgtype:error :: code:2 :: module:Sablotron :: > URI:arg:/template :: line: > 11 :: msg:XML parser error 7: mismatched tag > [Tue Nov 26 13:41:03 2002] [warn] [client 129.13.95.158] [AxKit] > [DECLINED] Sablotron failed to process XML file > [Tue Nov 26 13:41:03 2002] [warn] [client 129.13.95.158] [AxKit] > [DECLINED] From: /usr/share/perl5/Error.pm : 148 > ====================================================== > > > > Regards > Martin -- Tod Harter Giant Electronic Brain --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
