View on
MetaCPAN
Aaron Straup Cope > XML-Filter-Glossary-0.2 > XML::Filter::Glossary::XBEL

Download:
XML-Filter-Glossary-0.2.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.1   Source  

NAME ^

XML::Filter::Glossary::XBEL - Implements an XBEL-based glossary system.

SYNOPSIS ^

You should really be using XML::Filter::Glossary proper, but since you're here :

 use XML::Filter::Glossary::XBEL;

 my $glossary = XML::Filter::Glossary::XBEL->new();
 my $parser   = XML::SAX::ParserFactory->parser(Handler=>$glossary);

 $glossary->set_keyword("aaronland");
 $parser->parse_uri("/path/to/glossary.xbel");

 print $glossary->result();

DESCRIPTION ^

Perform a glossary lookup via an XBEL files.

PACKAGE METHODS ^

__PACKAGE__->new(%args)

Inherits from XML::SAX::Base

OBJECT METHODS ^

$pkg->set_keyword($text)

Set the keyword to lookup in the glossary.

$text will be compared against :

 # No, the package doesn't use XPath.
 # I just find the syntax handy, sometime.
 /xbel//bookmark[title='$text']

$pkg->result()

Returns a string, formatted as an HTML anchor element.

If no match was found, returns undef.

VERSION ^

0.1

DATE ^

September 10, 2002

AUTHOR ^

Aaron Straup Cope

SEE ALSO ^

XML::Filter::Glossary

LICENSE ^

Copyright (c) 2002, Aaron Straup Cope. All Rights Reserved.

This is free software, you may use it and distribute it under the same terms as Perl itself.

syntax highlighting: