Taxi::Mysql::Format::HTML - hit list formatter: HTML


(Back to Top)


NAME

Taxi::Mysql::Format::HTML - hit list formatter: HTML (via XSLTBibl)

(Back to Top)


SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 use Taxi::Mysql::Format::HTML;
 ##========================================================================
 ## Constructors etc.
 $q = $CLASS_OR_OBJ->new(%args);
 ##========================================================================
 ## API: Transformation
 \%params = $fmt->xsltParams($hitList);
 ##========================================================================
 ## API: stylesheet
 $style                 = $fmt->stylesheet($hl);
 $styleString           = $fmt->styleString();
 $xslNamespaceFragement = $fmt->htmlTemplateNS();
 $xslParamsFragment     = $fmt->htmlTemplateParams();
 $xslFragment = $fmt->htmlTemplateOptions();
 $xslFragment = $fmt->htmlTemplateRoot();
 $xslFragment = $fmt->htmlTemplateHead();
 $xslFragment = $fmt->htmlTemplateFoot();
 $xslFragment = $fmt->htmlTemplateNoHits();
 $xslFragment = $fmt->htmlTemplateHit();
 $xslFragment = $fmt->htmlTemplateHitTok();
 $xslFragment = $fmt->htmlTemplateHitBibl();
 $xslFragment = $fmt->htmlTemplateOther();
 ##========================================================================
 ## API
 $mimeType = $fmt->contentType();
 $hitElt   = $fmt->hitElement($hit);

(Back to Top)


DESCRIPTION

Taxi::Mysql::Format::HTML is a class for formatting HitList objects as HTML, using the Taxi::Mysql::Format::XSLTBibl module.

Globals etc.

Variable: @ISA

Taxi::Mysql::Format::XML inherits from and implements the API specified by Taxi::Mysql::Format::XSLTBibl.

Constructors etc.

new
 $q = $CLASS_OR_OBJ->new(%args);

Object structre / known %args:

   {
    ##-- new options in HTML:
    htmlCss => \@cssURLs,
    htmlTitle => $htmlTitleFragment
    htmlIcon  => \@iconSpecs,       ##--  [ [$mimeType,$url], ... ] for html icons
    ##-- Stylesheet data
    parser   => $xml_parser, ##-- XML::LibXML::Parser object; default = $_parser
    xslt     => $xslt,       ##-- an XML::LibXSLT object; default = (new object)
    styledoc => $doc,        ##-- an XML::LibXML::Document for the stylesheet (see parseStyle*() methods)
    stylesheet => $style,    ##-- an XML::LibXSLT::Stylesheet object (parsed stylesheet)
    params   => \%params,    ##-- params for $style->transform()
    ##-- XML formatting (from ../XML)
    xmlVersion    => $version,  ##-- output XML version (default="1.0")
    xmlEncoding   => $encoding, ##-- output XML encoding (default="UTF-8")
    xmlHitListElt => $listElt,  ##-- element for whole HitList (root); default='hitlist'
    xmlHitElt     => $hitElt,   ##-- element for single hits; default='hit'
    xmlTokElt     => $tokElt,   ##-- element for single tokens; default='tok'
    xmlHitNAttr   => $hitNAttr, ##-- hit-number attribute (default="n")
    pretty        => $level,    ##-- $format argument for XML::LibXML::Document->toXXX()
    ##-- Source data (from ../../Format)
    index  => $index,     ##-- underlying Taxi::Mysql object
   }

API: Transformation

xsltParams
 \%params = $fmt->xsltParams($hitList);

Adds default parameters:

  indexDsn    ##-- DSN database identifier for associated index
  indexPrefix ##-- 'prefix' attribute of associated index

API: stylesheet

stylesheet
 $style = $fmt->stylesheet($hl);

Returns a (new) stylesheet for $hl, defaults to $hl->parseStyleString($hl->styleString()).

styleString
 $styleString = $fmt->styleString();

Return a (new) XSLT style string, Defaults to $_[0]->{htmlStyleString}. Fefault stylesheet is built from $hl->htmlTemplateXXX() methods.

htmlTemplateNS
 $xslNamespaceFragement = $fmt->htmlTemplateNS();

(undocumented)

htmlTemplateParams
 $xslParamsFragment = $fmt->htmlTemplateParams();

(undocumented)

htmlTemplateOptions
 $xslFragment = $fmt->htmlTemplateOptions();

(undocumented)

htmlTemplateRoot
 $xslFragment = $fmt->htmlTemplateRoot();

(undocumented)

htmlTemplateHead
 $xslFragment = $fmt->htmlTemplateHead();

(undocumented)

htmlTemplateFoot
 $xslFragment = $fmt->htmlTemplateFoot();

(undocumented)

htmlTemplateNoHits
 $xslFragment = $fmt->htmlTemplateNoHits();

(undocumented)

htmlTemplateHit
 $xslFragment = $fmt->htmlTemplateHit();

(undocumented)

htmlTemplateHitTok
 $xslFragment = $fmt->htmlTemplateHitTok();

(undocumented)

htmlTemplateHitBibl
 $xslFragment = $fmt->htmlTemplateHitBibl();

(undocumented)

htmlTemplateOther
 $xslFragment = $fmt->htmlTemplateOther();

(undocumented)

API

contentType
 $mimeType = $fmt->contentType();

Returns 'text/html'.

hitElement
 $hitElt = $fmt->hitElement($hit);

Explicitly calls Taxi::Mysql::Format::XMLBibl::hitElement() to force inheritance.

(Back to Top)


ACKNOWLEDGEMENTS

Perl by Larry Wall.

(Back to Top)


AUTHOR

Bryan Jurish <moocow@ling.uni-potsdam.de>

(Back to Top)


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.

(Back to Top)


SEE ALSO

perl(1), Taxi::Mysql(3perl), Taxi::Mysql::Format(3perl), Taxi::Mysql::Format::Base(3perl), Taxi::Mysql::Format::XMLBibl(3perl), Taxi::Mysql::Format::XSLTBibl(3perl), Taxi::Mysql::Format::Text(3perl).

(Back to Top)

 Taxi::Mysql::Format::HTML - hit list formatter: HTML