RE: Tests and other things
|| -Original Message- || From: [EMAIL PROTECTED] || [mailto:[EMAIL PROTECTED] On Behalf Of Vladimir || R. Bossicard || Sent: dinsdag 25 februari 2003 13:55 || To: [EMAIL PROTECTED] || Subject: Re: Tests and other things || || || This bug hasn't been solved yet because I think we should first || discuss some kind of fundamental solution to handling || white-spaces. || || What do you propose? Let's discuss this using some use-cases: xupdate:modifications version=1.0 xmlns:xupdate=http://www.xmldb.org/xupdate; xupdate:insert-before select=/addresses/[EMAIL PROTECTED]'Andreas']/@name xupdate:attribute name=id2/xupdate:attribute /xupdate:insert-before /xupdate:modifications Clearly, in this case your not interested in the white-spaces outside the xupdate:attribute elements (in fact it causes problems in Lexus right now). Solutions would be: 1. Let Lexus ignore / stop on illegal combinations Doesn't sound very attractive to me: How many of these combinations do there exist? Do we have keep on patching Lexus' code when new illegal combinations are discovered? 2. Let Lexus ignore whitespaces May be difficult to implement (I'm not very familiar with SAX), whitespaces in text nodes cannot be ignored ofcourse but can whitespaces before and after text-nodes be ignored? xupdate:modifications version=1.0 xmlns:xupdate=http://www.xmldb.org/xupdate; xupdate:insert-before select=/addresses/[EMAIL PROTECTED]'Andreas'] xupdate:element name=address xupdate:attribute name=name Jeroen /xupdate:attribute xupdate:element name=townRotterdam/xupdate:element /xupdate:element /xupdate:insert-before /xupdate:modifications In this case it seems to me that the whitespace between the elements could be ignored but can the whitespaces before the new attribute value Jeroen ? xupdate:modifications version=1.0 xmlns:xupdate=http://www.xmldb.org/xupdate; xupdate:insert-before select=/addresses/[EMAIL PROTECTED]'Andreas'] address name=Jeroen townRotterdam/town /address /xupdate:insert-before /xupdate:modifications In this case the whitespaces between elements cannot be all ignored because it may be the intention of the user to have whitespaces after the address name=Jeroen and /town elements. Any other solutions or interesting use-case? regards, Jeroen -- X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 2818080 http://www.x-hive.com -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: Updating Attribute Values
|| -Original Message- || From: [EMAIL PROTECTED] || [mailto:[EMAIL PROTECTED] On Behalf Of Paul J. Caritj || Sent: woensdag 11 december 2002 08:19 || To: [EMAIL PROTECTED] || Subject: Updating Attribute Values || || given the document: || || itemgroup || item id=1 name=brick || . || item id=2 name=cat || || /itemgroup || || how would I select the ID of a brick ? || || My inclination would be the following: || /[EMAIL PROTECTED]brick]/attribute::id || Hi Paul, Try this: /itemgroup/[EMAIL PROTECTED]brick]/@id Or this //[EMAIL PROTECTED]brick]/@id Btw this is more an XPath issue that a XUpdate issue because XUpdate uses XPath to select nodes to perform operations on. regards, Jeroen Breedveld -- X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 7108622 http://www.x-hive.com -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: Namespace issue
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ronald Bourret Sent: woensdag 20 november 2002 22:52 To: [EMAIL PROTECTED] Subject: Re: Namespace issue I agree with you. The prefixes in the XUpdate document should be handled separately from the prefixes in the target document. Matching should only be done on the URI/local name pair. Ok, so this has to be corrected. I looked at some old emails in this maillinglist about namespace issues and it turned out the most of the code to solve this present namespace issue is already there! For the integration with Xindice prefix-namespaceuri pairs from the xupdate document are stored and apparantly only used by Xindice. Why the conclusion was raised that these pairs were unnecessary for Lexus itself I do not know. The working draft states nothing about how to a specifiy namespace uri. In the uses case I did this: xupdate:insert-after xmlns:addressX=http://www.xmldb.org/address2; select=/addresses/addressX:address address name=Jan townLas Vegas/town /address /xupdate:insert-after I this a logical thing to do? Does it conform for example with what XSLT does? Can anyone think of another way? What are the consequences for the DTD? Is validation (still?) a possibility? Any thoughts? greetings, Jeroen Breedveld -- X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 7108622 http://www.x-hive.com -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
Namespace issue
Hi all, I think I found a namespace issue. Apparantly Lexus resolves namespaces using namespace declarations from the target document (to be xupdated) instead of the namespace declarations from the xupdate document. I think this is wrong because prefixes don't matter only URIs matter. The working draft does not say anything about this matter but I think this is the logical thing to do. Any thoughts? USE CASE: input: ?xml version=1.0? addresses xmlns:address1=http://www.xmldb.org/address1; xmlns:address2=http://www.xmldb.org/address2; xmlns:address3=http://www.xmldb.org/address3; address1:address name=Lars address1:townLos Angeles/address1:town /address1:address address2:address name=Lars address2:townLos Angeles/address2:town /address2:address address3:address name=Lars address3:townLos Angeles/address3:town /address3:address /addresses xupdate: xupdate:modifications version=1.0 xmlns:xupdate=http://www.xmldb.org/xupdate; xupdate:insert-after xmlns:addressX=http://www.xmldb.org/address2; select=/addresses/addressX:address xupdate:commentnew addresses/xupdate:comment address name=Jan townLas Vegas/town /address xupdate:commentend of new adresses/xupdate:comment /xupdate:insert-after /xupdate:modifications expected result: ?xml version=1.0? addresses xmlns:address1=http://www.xmldb.org/address1; xmlns:address2=http://www.xmldb.org/address2; xmlns:address3=http://www.xmldb.org/address3; address1:address name=Lars address1:townLos Angeles/address1:town /address1:address address2:address name=Lars address2:townLos Angeles/address2:town /address2:address !--new addresses-- address name=Jan townLas Vegas/town /address !--end of new adresses-- address3:address name=Lars address3:townLos Angeles/address3:town /address3:address /addresses exception: Prefix must resolve to a namespace: addressX javax.xml.transform.TransformerException: Prefix must resolve to a namespace: addressX greetings, Jeroen Breedveld -- X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 7108622 http://www.x-hive.com -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: XUpdate and the '' character
Hi, Not using amp; shouldn't work at all because then the XML document isn't wellformed. I did some tests on the online XUpdate-demo on http://www.x-hive.com/xupdate this: (note amp; before http://myserver ...) xu:modifications version=1.0 xmlns:xu=http://www.xmldb.org/xupdate; xu:update select=/addresses/address/townamp;http://myserver.cgi?parameter1=min eparameter2=0/xu:update /xu:modifications results in this: ?xml version=1.0? addresses address name=Andreas town/town /address address name=Lars town/town /address /addresses It appears that when a text-node contains character entities, SAX breaks the string up in to pieces that for some reason aren't all processed by XUpdate, only the first part is. If this is true it is a bug in XUpdate. greetings, Jeroen | -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: woensdag 17 april 2002 15:32 | To: [EMAIL PROTECTED] | Subject: Fw: XUpdate and the '' character | | | | Hi all, does somebody know an answer? | | Begin forwarded message: | | Date: Wed, 17 Apr 2002 11:19:07 +0100 | From: Jonathan R. Thorpe [EMAIL PROTECTED] | To: Xindice-Dev [EMAIL PROTECTED] | Subject: XUpdate and the '' character | | | Hi! | | I_m attempting to use XUpdate to update a node in our | Xindice database and I | _m having the following problem: | | I_m using the following XUpdate: | | xu:modifications version=1.0 | xmlns:xu=http://www.xmldb.org/xupdate; | xu:update | select=//RootNode/TestNodehttp://myserver.cgi?parameter1=m | ineparameter2= | 0/xu:update | /xu:modifications | | to update the contents of the node TestNode. When I query | the database to | see whether the update has been successful I find that the | node text has | been truncated from the __ onwards i.e. it has been updated to | http://myserver.cgi?parameter1=mine http://myserver.cgi/?parameter1=mine and not http://myserver.cgi?parameter1=mineparameter2=0 http://myserver.cgi/?parameter1=mineparameter2=0 as expected. I_ve tried replacing the __ with _amp;_ in the XUpdate query to see if that makes any difference_and it doesn_t! Can anybody suggest a way that I can update this node successfully? Thanks in advance, Jonathan Thorpe Sony BPRL Basingstoke UK -- __ Lars Martin mailto:[EMAIL PROTECTED] SMB GmbHhttp://www.smb-tec.com -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ -- -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: Bug with insert attributes with namespaces
| -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: woensdag 27 februari 2002 13:09 | To: [EMAIL PROTECTED] | Subject: Re: Bug with insert attributes with namespaces | | | Thanks Jeroen, do you think we're ready to create a new distribution? The two bugs I found are now solved so I think we could release a new distribution now. There are other issues that I have addressed in the mailinglist but they should be discussed more extensively before changing anything in the code. Those issues are: -Switching over to DOM2 compatibility only. That means removing the createElement() and setAttributeNode() functions. The advantage is less code and gaining full compatibilty with DOM2 (getLocalName() is not null anymore for DOM2 applications without namespaces). The disadvantage is losing DOM1-only compatibility. Personally I'm for losing DOM1-only compatibility since it is in the way of full compatibility with a newer version of the DOM standard. -The position of namespace declaration when inserting elements that have namespaces that do not exist yet in the xupdated document. I think we should go for something similar to XSLT or the upcoming DOM3 LS specification. Also, I noticed that unit-test have dissappeared from the new distribution. I would like to add new unit-tests based on the old unit-tests, the unit-tests I added for X-Hive/DB binding of Lexus (the ones I used to found the two bugs). greetings, Jeroen -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: [VOTE] New Committer: Jeroen Breedveld
Title: RE: [VOTE] New Committer: Jeroen Breedveld | -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED]]On | Behalf Of Lars Martin | Sent: donderdag 7 februari 2002 17:38 | To: [EMAIL PROTECTED] | Subject: Re: [VOTE] New Committer: Jeroen Breedveld | | | On Thu, 31 Jan 2002 09:55:12 -0700 | Kimbro Staken [EMAIL PROTECTED] wrote: | | Welcome on board, Jeroen. :-) Thanks, I'm glad to join the XUpdate effort and hope I can help you make XUpdate a succes. greetings, Jeroen
RE: [VOTE] New Committer: Jeroen Breedveld
| -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: donderdag 7 februari 2002 17:38 | To: [EMAIL PROTECTED] | Subject: Re: [VOTE] New Committer: Jeroen Breedveld | | Welcome on board, Jeroen. :-) Thanks, I'm glad to join the XUpdate effort and hope I can help you make XUpdate a succes. greetings, Jeroen -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: [VOTE] New Committer: Jeroen Breedveld
| -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: donderdag 7 februari 2002 17:38 | To: [EMAIL PROTECTED] | Subject: Re: [VOTE] New Committer: Jeroen Breedveld | | Welcome on board, Jeroen. :-) | Regards, Lars. Thanks, I'm glad to join the XUpdate effort and hope I can help you make XUpdate a succes. greetings, Jeroen -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: [VOTE] New Committer: Jeroen Breedveld
| -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Jeroen Breedveld | Sent: dinsdag 12 februari 2002 15:56 | To: [EMAIL PROTECTED] | Subject: RE: [VOTE] New Committer: Jeroen Breedveld | | Thanks, | | I'm glad to join the XUpdate effort and hope I can help you | make XUpdate a succes. I'm sorry to say the superfluous amount of mail is not due to my excitement of becoming a committer but to problems with our Exchange server ;) Jeroen -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
RE: Is this a bug?
| -Original Message- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: dinsdag 15 januari 2002 16:24 | To: [EMAIL PROTECTED] | Subject: Re: Is this a bug? | | | On Fri, 11 Jan 2002 14:54:38 +0100 | Jeroen Breedveld [EMAIL PROTECTED] wrote: | | Just to understand you correctly: | - The following is the result Lexus produces for the XUpdate file | provided above? Yes, and as you can see the xmlns:address namespace declaration has moved to the documentelement although I intended it to be in the third address element where the address prefix is used. | addresses xmlns:address=http://www.x-hive.com/address; |address name=Andreas | townNew York/town |/address |address name=Lars | townLos Angeles/town |/address |address:address name=Jeroen | address:townRotterdam/address:town |/address:address | /addresses[1] | I found the cause in line 40 of InsertElement.java: if (qName.indexOf( : )=0) { contextNode.getOwnerDocument().getDocumentElement().setAttribute( xmlns: + qName.substring( 0, qName.indexOf( : ) ), namespaceURI ); } this means (I think) that every time comes upon a element with a namespace ( if (qName.indexOf( : )=0) ) it sets the xmlns:address attribute on the documentelement. I think this part should be removed because the namespace declaration should stay in the element where it was encountered originally. I tried this but for some reason the attribute xmlns:address doesn't appear in the third address element as you can see in the output above (although the name attribute is copied correctly) greetings, jeroen -- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe:mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ --
alternative for introducing move operation
Title: alternative for introducing move operation Hi, I've come up with a new idea for introducing a move-operation to the list of operations of XUpdate. This idea has the advantage that existing insert operations can stay the same and that there is not no need for a append equivalent for move operations which I overlooked a few weeks ago when there was a active discussion about the introduction of a move operation to the XUpdate operations. xupdate:insert-before select=XPath xupdate:move select=XPath/ /xupdate:insert-before xupdate:insert-after select=XPath / xupdate:move select=XPath/ /xupdate:insert-after xupdate:append select=XPath child=last()|first()|2 / xupdate:move select=XPath/ /xupdate:append A move would always have to be inside a insert or append element. A copy operation could also introduced this way xupdate:copy select=XPath/ Jeroen -- X-Hive Corporation e-mail: [EMAIL PROTECTED] phone: +31 10 7108622 http://www.x-hive.com