Bug#649962: why doesn't it work for me?

November 24th, 2011 - 08:40 pm ET by jidanni | Report spam
Package: basex
Version: 7.0.2-1

All I know is "it works for your provided simple example file, but not my real
life things."

$ cd /tmp; basex -c "OPEN input; XQUERY /"|head
<html>
<!-- Header -->
<head id="0">
<title>XML</title>
</head>
<!-- Body -->
<body id="1" bgcolor="#FFFFFF" text="#000000" link="#0000CC">
<h1>Databases &amp; XML</h1>
<div align="right">
<b>Assignments</b>
$ cd /tmp; basex -c "OPEN input; XQUERY //li"|head
<li>Exercise 1</li>
<li>Exercise 2</li>$
$ cd $r; basex -c "OPEN input; XQUERY /"|head
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://purl.org/atom/app#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gml="http://www.opengis.net/gml" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:georss="http://www.georss.org/georss">
<id>http://gdata.youtube.com/feeds/api/...lt;/id>
<updated>2011-11-22T07:44:03.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://gdata.youtube.com/schemas/20...quot;/>
<title type="text">浩室、舞 House, Dance</title>
<subtitle type="text"/>
<logo>http://www.youtube.com/img/pic_yout...;/logo>
<link rel="alternate" type="text/html" href="http://www.youtube.com/view_play_list?pDE82BB5C96D594"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/...quot;/>
<link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/...quot;/>
$ cd $r; basex -c "OPEN input; XQUERY //id"|head
$

Why doesn't my query work?

If you need the file I used,
$ cat makefile
FDE82BB5C96D594?prettyprint=true
P=http://gdata.youtube.com/feeds/api/playlists/$F
b:$F;basex -Vc "CREATE DB input $?; XQUERY /"

Maybe my lines are too long?



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Alexander Holupirek
November 26th, 2011 - 06:30 pm ET | Report spam
On 25.11.2011, at 02:32, wrote:

Package: basex
Version: 7.0.2-1

All I know is "it works for your provided simple example file, but not my real
life things."

$ cd /tmp; basex -c "OPEN input; XQUERY /"|head
<html>
<!-- Header -->
<head id="0">
<title>XML</title>
</head>
<!-- Body -->
<body id="1" bgcolor="#FFFFFF" text="#000000" link="#0000CC">
<h1>Databases &amp; XML</h1>
<div align="right">
<b>Assignments</b>
$ cd /tmp; basex -c "OPEN input; XQUERY //li"|head
<li>Exercise 1</li>
<li>Exercise 2</li>$
$ cd $r; basex -c "OPEN input; XQUERY /"|head
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://purl.org/atom/app#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gd="http://schemas.google.com/g/2005" xmlns:gml="http://www.opengis.net/gml" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:georss="http://www.georss.org/georss">
<id>http://gdata.youtube.com/feeds/api/...lt;/id>
<updated>2011-11-22T07:44:03.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://gdata.youtube.com/schemas/20...quot;/>
<title type="text">浩室、舞 House, Dance</title>
<subtitle type="text"/>
<logo>http://www.youtube.com/img/pic_yout...;/logo>
<link rel="alternate" type="text/html" href="http://www.youtube.com/view_play_list?pDE82BB5C96D594"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/...quot;/>
<link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml" href="http://gdata.youtube.com/feeds/api/...quot;/>
$ cd $r; basex -c "OPEN input; XQUERY //id"|head
$

Why doesn't my query work?

If you need the file I used,
$ cat makefile
FDE82BB5C96D594?prettyprint=true
P=http://gdata.youtube.com/feeds/api/playlists/$F
b:$F;basex -Vc "CREATE DB input $?; XQUERY /"

Maybe my lines are too long?




No, it a namespace issue:

Create DB from URL:
$ basex -c 'create database playlist http://gdata.youtube.com/feeds/api/...print=true'
Spill out complete document:
$ basex -q 'doc("playlist")'
Retrieve id's:
$ basex -q 'doc("playlist")//*:id'

Thanks,
Alex


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics