Xacobeo::UI::XPathEntry(3pm)

Xacobeo::UI::XPathEntry3pm

Xpath text entry

Usage

        use Xacobeo::UI::XPathEntry;
        
        my $entry = Xacobeo::UI::XPathEntry->new();
        my $markup = sprintf '<span color="grey" size="smaller">%s</span>',
                escape_xml_text(__("XPath Expression..."))
        ;
        $entry->set_empty_markup($markup);
        
        # Must set a document in order to find the namespaces that are allowed
        $entry->set_document($document);
        
        if ($entry->is_valid) {
                my $xpath = $entry->get_text
                my $node = $document->find($xpath);
                $result_view->load_node($node);
        }

Overview

A text entry that validates XPath expressions. This widget is a Gtk2::Ex::Entry::Pango.

The widget validates the text in realtime. In order to support validation for namespaces a document has to be set first.

Properties

The following properties are defined:

document

The document being displayed.

valid

Indicates if the XPath expression beind displayed is valid based on the current document.

Methods

The following methods are available:

new

Creates a new instance. This is simply the parent's constructor.

set_document

Sets a the widget's document. A document is needed in order to provide the namespaces that allowed in the XPath expression.

Parameters:

•

$document

The main document; an instance of Xacobeo::Document.

is_valid

Returns "TRUE" if the current XPath expression is valid.

Releases

4 releases since Debian 6.0 (Squeeze); the text changed 3 times.

  1. 6.0
  2. 7
  3. 8
  4. 9

Authors

Emmanuel Rodriguez <[email protected]>.

From xacobeo 0.15-3+b2 in Debian 9 (Stretch). Parsed by carta from the page's man source.