Apache::AxKit::Plugin::Fragment man page on OpenServer

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

Apache::AxKit::Plugin:UsergContributed Perl Apache::AxKit::Plugin::Fragment(3)

NAME
       Apache::AxKit::Plugin::Fragment - Fragment plugin

SYNOPSIS
	 AxAddPlugin Apache::AxKit::Plugin::Fragment

DESCRIPTION
       This module provides direct web access to XML fragments, using an XPath
       syntax. By simply providing a querystring containing an XPath query,
       this module will set the XML to be parsed to be the XML nodes returned
       by the query. The nodes will be wrapped in either <result-
       set>...</resultset> or you can specify the outer tag using:

	       PerlSetVar XPathFragmentElement foo

       to wrap it in <foo>...</foo>.

USAGE
       Simply add this module to the plugin list before StyleFinder:

	       PerlHandler Apache::AxKit::Plugins::Fragment \
			       AxKit

       Then request a URL as follows:

	       http://server/myfile.xml?/some/xpath/query

       Queries that match the regular expression: ^\w+= are ignored, as are
       any invalid XPath queries.

       Note that it's important to write your stylesheet to make use of this
       capability! If you intend to use this Fragment plugin, you can't assume
       that your stylesheet will just magically work. It will have to not make
       assumptions about the XML being passed into it. The apply_templates()
       method of XPathScript is extremely useful here, as is the xpath query
       'name(/child::node())' which identifies the top level element's name.
       Here's how I got around this with my first experiments with this:

	       <!-- Main document body -->
	       <% if (findvalue('name(/child::node())') eq 'page') { %>
		       <%= apply_templates('/page/body/section') %>
	       <% } else { %>
		       <%= apply_templates('/') %>
	       <% } %>

       Which checks that the top level element is called 'page', otherwise it
       simply does apply_templates() on all the nodes.

perl v5.8.8			  2005-07-14Apache::AxKit::Plugin::Fragment(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