Well, six hours later, I found "updateResource()". It updates a single document based on document Id. Very nice!
Now the only question is how to update those pesky attributes... :-) Mark "Mark J. Stang" wrote: > Vadim, > Thanks for the suggestion. I think you are suggesting that > I make my updates based on my data. I don't think I > should have to do so. Also, I don't want to have to > customize my updates around my data. I have a > document key, a path to it and a new value. That is > all that should be necessary to make the update. > > >From my research, XUpdate and the XPath selection seem > to be designed around a single document, not a database. > > I guess what I am saying is that Xindice doesn't > provide an api to update a specific document with > xupdate. Tom/Kimbro said that I could update the > entire document, but that seems a bit of overhead. Also, > I have a client that is sending a change, why should > the client have to send the entire document? > > Tom/Kimbro have stated in the past that we shouldn't > create one big document, that we should create a bunch > of little documents. If I had one big document, then I > wouldn't have this problem, because the absolute path > would identify what should be updated. Since we > have broken the one big document in pieces, it is > now harder to identify which piece of the one big > document should be changed. > > Don't get me wrong, I perfectly happy with not > having one big document. I think Xindice is a > great product! I was hoping for a way to > specify which document I wanted updated. I > can fix this by pre-appending everyone one of > my documents by their key value and then > my update path will be unique. Xindice already > knows this, the api doesn't let me specify it. > > Sorry for the rant and the length :-) > > thanks, > Mark > > Vadim Gritsenko wrote: > > > > From: Mark J. Stang [mailto:[EMAIL PROTECTED] > > > > > > Kimbro/Tom/et. al., > > > I haven't been able to figure out how to do an "and". > > > > What's the problem? > > > > "//account/customer/name/first[text()='Mark' and ../last='Stang']" > > > > Vadim > > > > > The only > > > solution I can think of is to make the document key the root > > > of my document. That way I can guarantee that my "select" > > > will be unique. Does anyone have any other suggestions? > > > Does everyone agree this is the only solution using "xupdate"? > > > > > > thanks, > > > > > > Mark > > > > > > "Mark J. Stang" wrote: > > > > > > > Hi, > > > > I have been working with XUpdate and have a question. > > > > If I use a select, such as > > > > > > > > "//account/customer/name/first[text()='Mark']" > > > > > > > > for an XUpdate, aren't I telling it to change every first name that > > is > > > > 'Mark' > > > > to the new value. How do I specify a particular document, rather > > than > > > > all? > > > > This seems to be a "global change". I could embed the key in the > > > > document > > > > but then I have to have a "select" AND "select". Is there someway > > to > > > > specify > > > > a key to a document and its' path? > > > > > > > > thanks, > > > > > > > > Mark
