- From: Hugo Haas <hugo@dev.w3.org>
- Date: Fri, 30 Jul 2004 11:11:36 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/tools In directory homer:/tmp/cvs-serv18974 Modified Files: prevloc Log Message: Fixed now that I'm using an entity Index: prevloc =================================================================== RCS file: /sources/public/2002/ws/desc/tools/prevloc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** prevloc 30 Jul 2004 08:51:17 -0000 1.1 --- prevloc 30 Jul 2004 11:11:34 -0000 1.2 *************** *** 1,18 **** ! #!/usr/bin/perl -w # # Give the URL of the previous location ! use strict; ! use XML::DOM; ! ! my $file = $ARGV[0] || die; ! my @files; ! my $parser = new XML::DOM::Parser; ! my $doc = $parser->parsefile($file) || die; ! my $prevlocs = $doc->getElementsByTagName('prevlocs') || die; ! my $prevloc = $prevlocs->item(0) || die; ! my $locs = $prevloc->getElementsByTagName('loc') || die; ! my $loc = $locs->item(0) || die; ! my $href = $loc->getAttributeNode('href') || die; ! print $href->getValue(). "\n" || die; --- 1,9 ---- ! #!/bin/sh # # Give the URL of the previous location ! if [ -z "$1" -o ! -r "$1" ]; then ! exit 1 ! fi ! head -50 $1 | fgrep '<!ENTITY prevloc' | cut -d\" -f 2
Received on Friday, 30 July 2004 07:11:36 UTC