What i'm trying to do is the following:

When I start my program i get all the documents 
and run it. I can update the document in xindice (separate program)
to tell it to stop so. what i want to do is having the
orginal document extracted use the src:key to query the 
same document in xindice to see if the node that describes it 
in the program (if its been updated by separate program)  should continue
processing this document should 
continue.

Ex. Extracted xml doc

<ServiceProperties ... src:key="2" >
  <JobsTask run="true" />
  ..
</ServiceProperties>

Later a program will update the xml doc in xindice to show 
run="false"

So the original extracted xml doc with query src:key=3 and see
if the document should continue running or not

So since I know the src:key due to the original extracted i would
like to query the document in xindice using the src:key.

So is this a valid way of query it then:

XpathQueryService.setNamespace( "src", "htt
p://xml.apache.org/xindice/Query" );
query("//ServiceProperties [EMAIL PROTECTED]");

WOuld this query then work?

Thanks again


---------

I don't quite understand your intention here. 

The namespace which
contains the "key" attribute is called "htt
p://xml.apache.org/xindice/Query";
"src" is a prefix to which it is often bound. So, if anything, you'd have to
call 
XpathQueryService.setNamespace( "src", "htt
p://xml.apache.org/xindice/Query" ).

However even this will only get you anywhere unless the documents you're
querying \
actually CONTAIN such attributes. In general, Xindice adds this information
to the \
query result, but you can't search on it, as it's not usually part of the
original \
document...

Maybe if you explained what you're trying to achieve?

> -----Original Message-----
> From: Advincula, Eric [mailto:[EMAIL PROTECTED]
> Sent: 21 December 2002 07:52
> To: '[EMAIL PROTECTED]'
> Subject: get document by querying namespace
> 
> 
> I tried to query the src:key  to return the xml doc source.  
> I tried setting
> the XpathQueryService.setNamespace( "key", "key" )
> Or XpathQueryService.setNamespace( null, "key" ) then execute
> query("//ServiceProperties [EMAIL PROTECTED]");
> 
> But always return 0 when I look at the size.  So I know I'm doing this
> wrong.  Anyone hava ideas on how to do it properly?
> 
> Thanks
> 
>

Reply via email to