XSH not working with my SVG files ...

  • torpor

    torpor - 2004-11-02

    ... anyone know why?


    jay@jdev-g prios $ xsh -i
    xsh - XML Editing Shell version 1.8.2/0.12 (Revision: 1.32)

    Copyright (c) 2002 Petr Pajas.
    This is free software, you may use it and distribute it under
    either the GNU GPL Version 2, or under the Perl Artistic License.
    opUsing terminal type: Term::ReadLine::Perl
    Hint: Type `help' or `help | less' to get more help.
    xsh scratch:/> open yoyo=yoyoyo.svg
    parsing yoyoyo.svg
    xsh yoyo:/> ls
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
    <svg id="svg1" width="340.00000pt" height="260.00000pt" sodipodi:version="0.32" inkscape:version="0.39" sodipodi:docname="yoyoyo.svg" sodipodi:docbase="/Volumes/seclorum/work/access/prios/dev/2/svg" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink">...</svg>

    Found 1 node(s).
    xsh yoyo:/> ls /svg

    Found 0 node(s).
    xsh yoyo:/> ls /svg/
    Invalid expression

    xsh yoyo:/> ls yoyo://svg

    Found 0 node(s).
    xsh yoyo:/>

    could it have something to do with namespaces?

    • Petr Pajas

      Petr Pajas - 2006-10-29

      This is probably too old a post to reply to, but just for the record:

      the problem lies in the default namespace (it does not apply to XPath). You *must* register a namespace prefix, e.g. with:

      register-namespace s "http://www.w3.org/2000/svg";
      ls /s:svg;

      -- Petr


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks