2 problems when first use

Help
Tong Sun
2006-10-29
2013-05-01
  • Tong Sun
    Tong Sun
    2006-10-29

    Hi,

    I found 2 problems durig my first use.

    1. what's wrong with the following 'list's? I'm sure the file has h1, h2 and h3.

    $scratch/> open ...
    parsing ...
    done.

    /> list //h3

    Found 0 node(s).
    /> list //h2

    Found 0 node(s).
    /> list //h1

    Found 0 node(s).

    2. I get the Can't locate object method "print" error:

    /> ls /
    Can't locate object method "print" via package "Term::ReadLine::Gnu::Var" at /usr/local/share/perl/5.8.8/XML/XSH2/Functions.pm line 138.
    at <STDIN> line 1, column 4,
    /> list /
    Can't locate object method "print" via package "Term::ReadLine::Gnu::Var" at /usr/local/share/perl/5.8.8/XML/XSH2/Functions.pm line 138.
    at <STDIN> line 1, column 6,

    why is that?

    PS. I'm installing XML::XSH2 under Debian Testing, and my Term::ReadLine is

    ii libterm-readline-perl-perl_1.0302-1

    is it too old?

    thanks

     
    • Tong Sun
      Tong Sun
      2006-10-29

      > I'm installing XML::XSH2 under Debian Testing, and my Term::ReadLine is

      > ii libterm-readline-perl-perl_1.0302-1

      > is it too old?

      hmm... probably not:

      cpan> i /Term::ReadLine/
      CPAN: Storable loaded ok
      Going to read /vars/cpan/Metadata
        Database was generated on Fri, 27 Oct 2006 05:24:13 GMT
      Module          Term::ReadLine  (N/NW/NWCLARK/perl-5.8.8.tar.gz)
      Module          Term::ReadLine::Gnu (H/HA/HAYASHI/Term-ReadLine-Gnu-1.16.tar.gz)
      [...]

      cpan> install Term::ReadLine::Gnu
      Term::ReadLine::Gnu is up to date.

      so...?

      thank

       
    • Petr Pajas
      Petr Pajas
      2006-10-29

      Ad 1. XHTML, right? XHTML has a namespace and XPath does not honour default namespaces. You have to register a namespace prefix, say 'x' and use //x:h1 instead. To do so, use

      register-xhtml-namespace x; (XHTML only)
      or
      register-namespace [prefix] [namespace-uri] (any XML namespace)

      Ad 2. I believe this is fixed in the CVS, please use the CVS version.

      -- Petr

       
    • Tong Sun
      Tong Sun
      2006-10-30

      thanks, all problem sovled, as suggested.