You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Chuck Amadi <ch...@breconbeacons.org> on 2002/10/02 09:57:15 UTC

Problem running xpath on live xml content documents Xindice

Hi there , I am running Xindice Server and I have populated my /db with 
my works project of transforming html to xhtml / xml content web pages.
Thus I don't have many attributes as there was no real need for them. So 
on the few I did have i.e

<article>
    <section label="decription">
     </section>
</article>

when I run xpath query [xindice bin]$ xpath -c /db/xmlproject/english -q 
/article/section/ -v <!-- I get a results but when I try
xpath -c /db/xmlproject/english -q 
/article/section[@label="description"] there is no result or responc 
just reverts to the [xindice/bin] $ prompt.

Any pointer would be gratful as I 'm working on a work project that will 
entail the complete web-site consisting of a further 20 html pages to 
transform to xhtl/ xml content and DIDO via NXD's. So I will be updating 
the database using Xupdate on thee xml  pages on a regular basis.

Cheers in advance

         

-- 
Regards 
Chuck Amadi
ICT Dept Systems Programmer
Rhaglenydd Systemau Adran ICT

Before you criticize someone,
you should walk a mile in their shoes.
That way, when you criticize them,
you're a mile away, and you have their shoes.




Re: Problem running xpath on live xml content documents Xindice

Posted by Chuck Amadi <ch...@breconbeacons.org>.
Jeff Greif wrote:

>Properly quote the query argument on the command line:
>
>xpath -c /db/xmlproject/english -q "/article/section[@label='description']"
>
>This is necessary particularly in the Windows command shell, but in others
>as well.
>
>Jeff
>----- Original Message -----
>From: "Chuck Amadi" <ch...@breconbeacons.org>
>To: <xi...@xml.apache.org>
>Sent: Wednesday, October 02, 2002 12:57 AM
>Subject: Problem running xpath on live xml content documents Xindice
>
>
>>Hi there , I am running Xindice Server and I have populated my /db with
>>my works project of transforming html to xhtml / xml content web pages.
>>Thus I don't have many attributes as there was no real need for them. So
>>on the few I did have i.e
>>
>><article>
>>    <section label="decription">
>>     </section>
>></article>
>>
>>when I run xpath query [xindice bin]$ xpath -c /db/xmlproject/english -q
>>/article/section/ -v <!-- I get a results but when I try
>>xpath -c /db/xmlproject/english -q
>>/article/section[@label="description"] there is no result or responc
>>just reverts to the [xindice/bin] $ prompt.
>>
>
>
Cheers I'll try that albiet I note you mention properly - I have 
commenced Xindice from
i.e http://xml.apache.org/xindice/ToolsReference.html No mention of 
quots though nevermind!!

Cheers again

-- 
Regards 
Chuck Robert Amadi
ICT Dept Systems Programmer.
Rhaglenydd Systemau Adran ICT.
Power too deliver.
Y gallu i y Dosbarthu.

Before you criticize someone,
you should walk a mile in their shoes.
That way, when you criticize them,
you're a mile away, and you have their shoes.





Re: Problem running xpath on live xml content documents Xindice

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Properly quote the query argument on the command line:

xpath -c /db/xmlproject/english -q "/article/section[@label='description']"

This is necessary particularly in the Windows command shell, but in others
as well.

Jeff
----- Original Message -----
From: "Chuck Amadi" <ch...@breconbeacons.org>
To: <xi...@xml.apache.org>
Sent: Wednesday, October 02, 2002 12:57 AM
Subject: Problem running xpath on live xml content documents Xindice


> Hi there , I am running Xindice Server and I have populated my /db with
> my works project of transforming html to xhtml / xml content web pages.
> Thus I don't have many attributes as there was no real need for them. So
> on the few I did have i.e
>
> <article>
>     <section label="decription">
>      </section>
> </article>
>
> when I run xpath query [xindice bin]$ xpath -c /db/xmlproject/english -q
> /article/section/ -v <!-- I get a results but when I try
> xpath -c /db/xmlproject/english -q
> /article/section[@label="description"] there is no result or responc
> just reverts to the [xindice/bin] $ prompt.



Re: Problem running xpath on live xml content documents Xindice

Posted by Fernando Padilla <fe...@interdimensions.com>.
Ah, someone else might chime in soon with better information, but this is
probably a shell escaping issue.

try putting single quotes around the whole xpath expression.

Fernando

On Wed, 2 Oct 2002, Chuck Amadi wrote:

> Hi there , I am running Xindice Server and I have populated my /db with 
> my works project of transforming html to xhtml / xml content web pages.
> Thus I don't have many attributes as there was no real need for them. So 
> on the few I did have i.e
> 
> <article>
>     <section label="decription">
>      </section>
> </article>
> 
> when I run xpath query [xindice bin]$ xpath -c /db/xmlproject/english -q 
> /article/section/ -v <!-- I get a results but when I try
> xpath -c /db/xmlproject/english -q 
> /article/section[@label="description"] there is no result or responc 
> just reverts to the [xindice/bin] $ prompt.
> 
> Any pointer would be gratful as I 'm working on a work project that will 
> entail the complete web-site consisting of a further 20 html pages to 
> transform to xhtl/ xml content and DIDO via NXD's. So I will be updating 
> the database using Xupdate on thee xml  pages on a regular basis.
> 
> Cheers in advance
> 
>          
> 
>