Changeset 194

Show
Ignore:
Timestamp:
09/09/06 20:15:44 (2 years ago)
Author:
matt
Message:

Support for EzPod? in spod5
clean up the sample conf a little

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/etc/axkit.conf.sample

    r193 r194  
    101101#         DirectoryIndex index.xml 
    102102#         Plugin generic_transform 
    103 #         Transformation XSLT(demo/generic/stylesheet.xsl) XPathScript(demo/generic/stylesheet.xps) TAL(demo/generic/stylesheet.tal) 
     103#         Transformation             XSLT(demo/generic/stylesheet.xsl)  \ 
     104#                                    XPathScript(demo/generic/stylesheet.xps)  \ 
     105#                                    TAL(demo/generic/stylesheet.tal) 
    104106#      </Location> 
    105107 
  • trunk/plugins/spod5

    r173 r194  
    8989use AxKit2::Transformer::XSLT; 
    9090 
     91use constant EZPOD => eval { require XML::Filter::EzPod }; 
     92 
    9193my $xslt   = XML::LibXSLT->new(); 
    9294my $parser = XML::LibXML->new(); 
     
    107109     
    108110    my $builder = XML::LibXML::SAX::Builder->new(); 
    109     my $p = Pod::SAX->new( Handler => $builder ); 
     111    my $handler = $builder; 
     112    if (EZPOD) { 
     113        $self->log(LOGDEBUG, "Using EzPod"); 
     114        $handler = XML::Filter::EzPod->new( Handler => $builder ); 
     115    } 
     116    my $p = Pod::SAX->new( Handler => $handler ); 
    110117    $p->parse_file($fh); 
    111118 
     
    300307 
    301308<xsl:template match="para"> 
    302   <p><xsl:apply-templates/></p> 
     309  <xsl:choose> 
     310    <xsl:when test="./*[name() != 'orderedlist' and name() != 'itemizedlist']"> 
     311      <p> 
     312        <xsl:apply-templates/> 
     313      </p> 
     314    </xsl:when> 
     315    <xsl:otherwise> 
     316      <xsl:apply-templates/> 
     317    </xsl:otherwise> 
     318  </xsl:choose> 
    303319</xsl:template> 
    304320