Hi Tim, Ah. In that case I would have written a 'has-changed' function, that returns a Boolean. You apply that to all values first, and check for trues and falses after that. You can do that more fixed, but you could also collect Boolean in a sequence and look for a true in that as well. Makes sense?
Kind regards, Geert -----Oorspronkelijk bericht----- Van: [email protected] [mailto:[email protected]] Namens Tim Meagher Verzonden: donderdag 15 september 2011 16:43 Aan: 'General MarkLogic Developer Discussion' Onderwerp: Re: [MarkLogic Dev General] How to effectively pass variables by reference to an xquery function? Hi Geert, In general that's a great idea, but in reality I'm setting a status to indicate if a change has occurred between a web form value and the previous results in the database to determine if a requested save should be performed. Therefore I need to check each value and not exit out of a try-catch block if a change occurs. I suppose I could try using javascript to indicate if any form fields have changed, but there is some logic that needs to be performed on the server side that I don't think I can necessarily handle using javascript. ~Tim -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Geert Josten Sent: Thursday, September 15, 2011 10:30 AM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] How to effectively pass variables by reference to an xquery function? Hi Tim, I would rather use exception handling for something like that. Make the test function 'assert', and have it call 'error(...)' when conditions aren't met. Use try catch to handle the exception more gracefully.. Kind regards, Geert _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
