Apache::AxKit::Provider man page on OpenServer

Man page or keyword search:  
man Server   5388 pages
apropos Keyword Search (all sections)
Output format
OpenServer logo
[printable version]

Provider(3)	      User Contributed Perl Documentation	   Provider(3)

NAME
       Apache::AxKit::Provider - base Provider class

SYNOPSIS
       Override the base ContentProvider class and enable it using:

	   AxContentProvider MyClass

	   # alternatively use:
	   # PerlSetVar AxContentProvider MyClass

       Override the base StyleProvider class and enable it using:

	   AxStyleProvider MyClass

	   # alternatively use:
	   # PerlSetVar AxStyleProvider MyClass

DESCRIPTION
       The Provider class is used to read in the data sources for the given
       URL.  The ContentProvider handles the task of returning the data for
       the XML source document, while the StyleProvider fetches the data for
       any stylesheets that will be applied to that source document. The
       default for each is Provider::File, which reads from the filesystem,
       although obviously you can read from just about anywhere.

       Should you wish to override the default Provider, these are the methods
       you need to implement:

       process()

       Determine whether or not to process this URL. For example, you don't
       want to process a directory request, or if the resource doesn't exist.
       Return 1 to tell AxKit to process this URL, or die with a Declined
       exception (with a reason) if you do not wish to process this URL.

       mtime()

       Return the last modification time in days before the current time.

       get_styles()

       Extract the stylesheets from the XML resource. Should return an array
       ref of styles. The style entries are hashes refs with required keys
       'href', 'module' and 'type'.

       A sample return value of get_styles() could be:

	 [{ type => "text/xsl",
	    href => "path/to/your/stylesheet.xsl",
	    module => "Apache::AxKit::Language::LibXSLT" }]

       This allows one to use a different stylemapping than the default server
       configuration. If 'module' is ommited AxKit will apply the given
       default module for the type as it was added by 'AxAddStyleMap' in the
       configuration.

       get_fh()

       This method should return an open filehandle, or die if that's not pos-
       sible.

       get_strref()

       This method returns a reference to a scalar containing the contents of
       the stylesheet, or die if that's not possible. At least one of get_fh
       or get_strref must work.

       key()

       This method should return a "key" value that is unique to this URL.

       get_ext_ent_handler()

       This should return a sub reference that can be used instead of
       XML::Parser's default external entity handler. See the XML::Parser doc-
       umentation for what this sub should do (or look at the code in the File
       provider).

       exists()

       Return 1 if the resource exists (and is readable).

perl v5.8.8			  2005-08-10			   Provider(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OpenServer

List of man pages available for OpenServer

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net