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 Dominic Gamble <do...@stratlink.com.au> on 2002/04/05 08:55:01 UTC

Xindice doesn't fully support XPath? /@attribute doesn't work!

It seems that XPath /@attribute queries don't work in Xindice! Please
tell me I am wrong.

When I execute the following xpath query:

xindice xpath -c /db/websystem -q "/Classes/Class[last()]"

I get the following results:

<?xml version="1.0"?>
<Class name="Page" id="1" superclass="1" template="1"
xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/websystem"
src:key="class">
	<Elements>
		<Element name="Title" class="Single Line Text" required="true" />
		<Element name="Author" class="Single Line Text" required="false" />
		<Element name="Keywords" class="Single Line Text" required="false" />
		<Element name="Description" class="Single Line Text" required="false"
/>
	</Elements>
</Class>

This is all ok, but when I then attempt to get the attribute 'id' only,
using the following query:
	
xindice xpath -c /db/websystem -q "/Classes/Class[last()]/@id"

I get NOTHING! This happens both from the command line, _and_ from
within code.

Does anyone know why? Has it just not been implemented?
I'm using Xindice 1.0.

Thanks,
Dominic Gamble
Stratlink


Re: Xindice doesn't fully support XPath? /@attribute doesn't work!

Posted by Miguel Angel Urrutia Soler <ur...@hotmail.com>.
you're rigth... Xindice doesn't implement just attributtes xqueries... if
you want to get some attribute you have to get the container element of that
attribute.

Miguel Angel Urrutia

----- Original Message -----
From: "Dominic Gamble" <do...@stratlink.com.au>
To: <xi...@xml.apache.org>
Sent: Friday, April 05, 2002 12:55 AM
Subject: Xindice doesn't fully support XPath? /@attribute doesn't work!


> It seems that XPath /@attribute queries don't work in Xindice! Please
> tell me I am wrong.
>
> When I execute the following xpath query:
>
> xindice xpath -c /db/websystem -q "/Classes/Class[last()]"
>
> I get the following results:
>
> <?xml version="1.0"?>
> <Class name="Page" id="1" superclass="1" template="1"
> xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/websystem"
> src:key="class">
> <Elements>
> <Element name="Title" class="Single Line Text" required="true" />
> <Element name="Author" class="Single Line Text" required="false" />
> <Element name="Keywords" class="Single Line Text" required="false" />
> <Element name="Description" class="Single Line Text" required="false"
> />
> </Elements>
> </Class>
>
> This is all ok, but when I then attempt to get the attribute 'id' only,
> using the following query:
>
> xindice xpath -c /db/websystem -q "/Classes/Class[last()]/@id"
>
> I get NOTHING! This happens both from the command line, _and_ from
> within code.
>
> Does anyone know why? Has it just not been implemented?
> I'm using Xindice 1.0.
>
> Thanks,
> Dominic Gamble
> Stratlink
>
>