On Tue, Jun 11, 2002 at 02:12:39PM -0700, Gary Hallmark wrote: > xindice only processes xpath expressions that return elements. If you ask > for an attribute or text node, you won't get anything. If you ask for the > enclosing element, you'll get it plus what you wanted. Presumably this is > because xindice likes to add additional attributes to the top level element > (like the original document key), and needs a place to hang them.
Thats very interesting. Thanks for explaining it to me !! Thing is I need to be able to evaluate queries like this (either text() or attributes should do) since I want to do postprocessing on the results. As an example, I might want to compute set difference between results of "//name/text()" on two documents etc. I know this is not a traditional application for XML, but my underlying dataset is highly structured. Have other people considered this problem ? I could take a hack at it and see if there is a way to do this, at least for me, since I don't see why I would need those additional attributes that Xindice adds, for my application. Does anybody have any quick pointers as to where I might be able to start? Thanks, Amol. > > IMHO this is all undesirable. Xindice should provide a separate interface > for retrieving those additional document attributes, and not stick them > into each top level result element. Then it could also return any XML node > as the result of an xpath query and still provide the additional > attributes. Another problem with the added attributes is that you may have > to remove them to validate results against a DTD or schema that doesn't > expect them. > > At 10:33 AM 6/11/02 -0700, you wrote: > > >Hi All, > > I am new to both XML and Xindice, and I apologize if this is a > > stupid/rtfm > >question. I looked around in faqs and archived messages, but couldn't find an > >answer. > > > >The query I was trying to run was "//name/text()". > >Stand-alone Xalan (2.3.1) works fine for this query, but Xindice (1.0) > >doesn't return anything, though it works fine for "//name". I even > >changed the > >default xalan library in Xindice to the 2.3.1 version, but that doesn't > >help either. > > > >Is this a known bug/problem ? Or am I doing something wrong ? > > > >Thanks, > >Amol. > > Cheers, Gary
