You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(85) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(47) |
Feb
(127) |
Mar
(268) |
Apr
(78) |
May
(47) |
Jun
(38) |
Jul
(131) |
Aug
(221) |
Sep
(187) |
Oct
(54) |
Nov
(111) |
Dec
(84) |
2011 |
Jan
(152) |
Feb
(106) |
Mar
(94) |
Apr
(90) |
May
(53) |
Jun
(20) |
Jul
(24) |
Aug
(37) |
Sep
(32) |
Oct
(70) |
Nov
(22) |
Dec
(15) |
2012 |
Jan
(33) |
Feb
(110) |
Mar
(24) |
Apr
(1) |
May
(11) |
Jun
(8) |
Jul
(12) |
Aug
(37) |
Sep
(39) |
Oct
(81) |
Nov
(38) |
Dec
(50) |
2013 |
Jan
(23) |
Feb
(53) |
Mar
(23) |
Apr
(5) |
May
(19) |
Jun
(16) |
Jul
(16) |
Aug
(9) |
Sep
(21) |
Oct
(1) |
Nov
(2) |
Dec
(8) |
2014 |
Jan
(16) |
Feb
(6) |
Mar
(27) |
Apr
(1) |
May
(10) |
Jun
(1) |
Jul
(4) |
Aug
(10) |
Sep
(19) |
Oct
(22) |
Nov
(4) |
Dec
(6) |
2015 |
Jan
(3) |
Feb
(6) |
Mar
(9) |
Apr
|
May
(11) |
Jun
(23) |
Jul
(14) |
Aug
(10) |
Sep
(10) |
Oct
(9) |
Nov
(18) |
Dec
(4) |
2016 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
(2) |
May
(15) |
Jun
(2) |
Jul
(8) |
Aug
(2) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(2) |
Feb
(12) |
Mar
(22) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(19) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfgang M. <wol...@ex...> - 2011-04-28 09:22:05
|
Hi Andrzej, ok, I change this to write to the trace log only. However, the message indeed points to an optimization issue which I introduced myself recently by removing some PathExpr wrappers, so thanks for reporting the warning. I need to fix the underlying problem. Wolfgang |
From: Jens Ø. P. <oe...@gm...> - 2011-04-28 06:59:09
|
Hi Andrzej, I had a number of these, but but they were easy enough to get rid of. An expression like if ($placeTerm[@type = 'text']) caused the error in the beginning of 28 Apr 2011 08:47:39,084 [eXistThread-192] WARN (Optimizer.java [visitFilteredExpr]:133) - Parent expression of step is not a PathExpr: if ( $placeTerm[attribute::type = "text"] ) then concat(atomize[dynamic-cardinality-check("zero or one", $placeTerm[attribute::transliteration]/child::text())], dynamic-cardinality-check("zero or one", " "), atomize[dynamic-cardinality-check("zero or one", $placeTerm[not(dynamic-cardinality-check("zero or more", attribute::transliteration))]/child::text())]) else if ( $placeTerm[attribute::authority = "marccountry"]/child::text() ) then doc(dynamic-cardinality-check("zero or one", concat(dynamic-cardinality-check("zero or one", $config:edit-app-root), dynamic-cardinality-check("zero or one", "/code-tables/marc-country-codes.xml"))))/child::code-table/child::items/child::item[child::value = $placeTerm]/child::label else if ( $placeTerm[attribute::authority = "iso3166"]/child::text() ) then doc(dynamic-cardinality-check("zero or one", concat(dynamic-cardinality-check("zero or one", $config:edit-app-root), dynamic-cardinality-check("zero or one", "/code-tables/iso3166-country-codes.xml"))))/child::code-table/child::items/child::item[child::value = $placeTerm]/child::label else $place/child::mods:placeTerm[not(dynamic-cardinality-check("zero or more", attribute::type))]/child::text() whereas no error is generated with if ($placeTerm[@type = 'text']/text()) In your case, it would occur when you set one of your variables. To me it looks like one is warned if a path expression does not end in a node. - Isn't this good? Best, Jens On Apr 28, 2011, at 6:49 AM, Andrzej Jan Taramina wrote: > With the latest trunk, I seem to be getting a lot of optimizer warnings that "Parent expression of > step is not a PathExpr", here's an example: > > 2011-04-27 23:51:47,841 ["http-bio-/127.0.0.1-80"-exec-1] WARN (Optimizer.java > [visitFilteredExpr]:133) - Parent expression of step is not a PathExpr: let … := > common:get-user-info(dynamic-cardinality-check("zero or more", $userid))[attribute::password = > $hashedPswd] return if ( common:is-token-based-auth-required(dynamic-cardinality-check("zero or > more", $user)) ) then login:check-token(dynamic-cardinality-check("zero or more", $userid), > dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), > dynamic-cardinality-check("zero or more", $pswd)) else if ( $user ) then if ( > common:user-requires-hardware-security-token(dynamic-cardinality-check("zero or more", $user)) ) > then login:check-hardware-security-token(dynamic-cardinality-check("zero or more", $userid), > dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), > dynamic-cardinality-check("zero or more", $pswd), dynamic-cardinality-check("zero or more", > $hwtoken)) else login:log-user-in(dynamic-cardinality-check("zero or more", $userid), > dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), > dynamic-cardinality-check("zero or more", $pswd)) else let $log := if ( $userid ) then > util:log-app(dynamic-cardinality-check("exactly one", "warn"), dynamic-cardinality-check("exactly > one", "com.coalese.raven.login"), dynamic-cardinality-check("zero or more", > concat(dynamic-cardinality-check("zero or one", "Failed, no matching credentials: "), > atomize[dynamic-cardinality-check("zero or one", $userid)]))) else () return 0 > > Any idea what is causing these? Is there any way to suppress these warnings since they clutter up > the logs, and if they aren't a real problem, should be restricted to trace or debug levels, IMO. > > Thanks! > > -- > Andrzej Taramina > Chaeron Corporation: Enterprise System Solutions > http://www.chaeron.com > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development |
From: Andrzej J. T. <an...@ch...> - 2011-04-28 04:50:14
|
With the latest trunk, I seem to be getting a lot of optimizer warnings that "Parent expression of step is not a PathExpr", here's an example: 2011-04-27 23:51:47,841 ["http-bio-/127.0.0.1-80"-exec-1] WARN (Optimizer.java [visitFilteredExpr]:133) - Parent expression of step is not a PathExpr: let $user := common:get-user-info(dynamic-cardinality-check("zero or more", $userid))[attribute::password = $hashedPswd] return if ( common:is-token-based-auth-required(dynamic-cardinality-check("zero or more", $user)) ) then login:check-token(dynamic-cardinality-check("zero or more", $userid), dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), dynamic-cardinality-check("zero or more", $pswd)) else if ( $user ) then if ( common:user-requires-hardware-security-token(dynamic-cardinality-check("zero or more", $user)) ) then login:check-hardware-security-token(dynamic-cardinality-check("zero or more", $userid), dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), dynamic-cardinality-check("zero or more", $pswd), dynamic-cardinality-check("zero or more", $hwtoken)) else login:log-user-in(dynamic-cardinality-check("zero or more", $userid), dynamic-cardinality-check("zero or more", $user), dynamic-cardinality-check("zero or more", $admin), dynamic-cardinality-check("zero or more", $pswd)) else let $log := if ( $userid ) then util:log-app(dynamic-cardinality-check("exactly one", "warn"), dynamic-cardinality-check("exactly one", "com.coalese.raven.login"), dynamic-cardinality-check("zero or more", concat(dynamic-cardinality-check("zero or one", "Failed, no matching credentials: "), atomize[dynamic-cardinality-check("zero or one", $userid)]))) else () return 0 Any idea what is causing these? Is there any way to suppress these warnings since they clutter up the logs, and if they aren't a real problem, should be restricted to trace or debug levels, IMO. Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Andrzej J. T. <an...@ch...> - 2011-04-28 04:44:45
|
When I try to create a collection that already exists using the eXist Ant task: <exist:create uri="${exist.url}/xmlrpc/db" collection="mycollection" user="${userid}" password="${password}"/> I get a NPE something like this: 28 Apr 2011 00:29:16,688 ["http-bio-/127.0.0.1-80"-exec-7] ERROR (XmlRpcErrorLogger.java [log]:36) - Failed to invoke method describeCollection in class org.exist.xmlrpc.RpcConnection: java.lang.NullPointerException or this: 28 Apr 2011 00:27:09,666 ["http-bio-/127.0.0.1-80"-exec-4] ERROR (XmlRpcErrorLogger.java [log]:36) - Failed to invoke method createCollection in class org.exist.xmlrpc.RpcConnection: java.lang.NullPointerException and further down in the stack trace, the culprit seems to be: Caused by: java.lang.NullPointerException at org.exist.security.UnixStylePermission.write(UnixStylePermission.java:448) at org.exist.collections.Collection.write(Collection.java:1514) at org.exist.storage.NativeBroker.saveCollection(NativeBroker.java:1268) at org.exist.xmlrpc.RpcConnection.createCollection(RpcConnection.java:175) which is this line in org.exist.security.UnixStylePermission.write(): ostream.writeInt(getOwner().getId()); so either the owner or the id is null. In the past, if you tried to create a collection that was already there, it was a no-op....which was convenient for when reloading stuff into the database using Ant, so I don't think this should be happening! Help please! PS...told ya security wasn't yet totally stable....figures I find all the edge-cases, eh? ;-) -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Adam R. <ad...@ex...> - 2011-04-28 00:57:22
|
We modified XPathException to provide the information that is required in XQuery 3.0 to support the try/catch expressions. As such all XQuery/XPath exceptions should have a defined error value and associated message. This works well for everything that is within the spec of F&O 3.0, as they define concise constant error codes and values. But, if you are working outside of that i.e. extension functions, then you need to define your own constant error values and descriptions. See the try/catch details in the XQuery 3.0 spec.... On 27 April 2011 23:50, Andrzej Jan Taramina <an...@ch...> wrote: > ...looks like many XPathException constructor signatures are now deprecated. Bit of a pain to > create ErrorCode()s for custom errors, but so be it. > > My question is whether the ErrorVal can be set safely to null for the constructor? > > XPathException( Expression expr, ErrorCode errorCode, String errorDesc, Sequence errorVal, > Throwable cause ) > > It looks like you can provide a description both in the ErrorCode object and separately in the > erroDesc. Can someone shed some light into why this is the case, and what happens if you provide > both or the description is missing in the ErrorCode or set to the empty string? Seems a bit odd to > have both. > > What is the errorVal used for? > > Can you tell I'm trying to update some of our custom extensions/functions to 1.5/Trunk? LOL > > Thanks! > > -- > Andrzej Taramina > Chaeron Corporation: Enterprise System Solutions > http://www.chaeron.com > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Andrzej J. T. <an...@ch...> - 2011-04-27 21:50:24
|
...looks like many XPathException constructor signatures are now deprecated. Bit of a pain to create ErrorCode()s for custom errors, but so be it. My question is whether the ErrorVal can be set safely to null for the constructor? XPathException( Expression expr, ErrorCode errorCode, String errorDesc, Sequence errorVal, Throwable cause ) It looks like you can provide a description both in the ErrorCode object and separately in the erroDesc. Can someone shed some light into why this is the case, and what happens if you provide both or the description is missing in the ErrorCode or set to the empty string? Seems a bit odd to have both. What is the errorVal used for? Can you tell I'm trying to update some of our custom extensions/functions to 1.5/Trunk? LOL Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Andrzej J. T. <an...@ch...> - 2011-04-27 19:53:50
|
It used to be that you could change the admin user's password using an ant task of the following structure: <exist:adduser failonerror="false" uri="${exist.url}/xmlrpc/db" user="anotherAdminUser" password="anotherAdminUserPassword" name="admin" secret="newAdminPassword" home="/db" primaryGroup="dba"/> Now it errors with the following message: [exist:adduser] XMLDB exception caught: Failed to invoke method addAccount in class org.exist.xmlrpc.RpcConnection: you are not allowed to change this user Why is it that we can no longer change the admin password in this way? Leaving the admin password unset is a bad idea, from a security perspective, and some of us want to be able to automate this reset using Ant, as we've done in the past. Thanks! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Andrzej J. T. <an...@ch...> - 2011-04-25 15:06:10
|
Adam: > Really? I would agree that there have been periods of instability > (sometimes turbulent) during 9 months, but not that it has been > unstable for 9 months. Trunk has not been recommended for production use (even by those of us that like living on the edge) since last summer. That's my definition of "unstable", but may not be yours. ;-) -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Adam R. <ad...@ex...> - 2011-04-25 08:53:55
|
> That's almost 9 months now! Really? I would agree that there have been periods of instability (sometimes turbulent) during 9 months, but not that it has been unstable for 9 months. > -- > Andrzej Taramina > Chaeron Corporation: Enterprise System Solutions > http://www.chaeron.com > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Dannes W. <da...@ex...> - 2011-04-22 13:31:12
|
All, We'll have eXist-db OSS telecon in about 90 minutes from now at 17u00 CEST ( http://www.timeanddate.com/worldclock/city.html?n=16 ). Subject is "trunk stability" which was discussed earlier this week on the mailing list. You are welcome to join us via Skype (skype id "dizzzz_nl"), minutes will be made live via the IRC chat channel. Sorry for the late notification :-) cheers Dannes Wessels -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 |
From: Andrzej J. T. <an...@ch...> - 2011-04-21 17:05:11
|
Wolfgang: > My impression is that the security backend has matured (Dmitryi, Adam, > please correct me if I'm wrong) and has reached a stable state again. > Apart from this, I was fighting to make sure that no new features are > added to eXist core while it is stabilizing - and I think I was > successful. Changes in extension modules which you can disable are not > as critical. > > The general idea was to branch of trunk once we agree it is feature > complete and stabilize it towards a 1.6 release. Thanks...sounds like I should try to upgrade our stuff in the next few weeks, as time allows. I'll report back in any issues I may encounter, since our healthcare app is pretty extensive and typically highlights issues pretty quickly when we upgrade. Thanks! Sorry I haven't been very active on the code side of things....been swamped with many other demands on my time. Hoping to see some light at the end of that tunnel and get back into eXist-related things soon. -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Wolfgang M. <wol...@ex...> - 2011-04-21 16:38:01
|
> Any idea when trunk might be stable enough for production use again? It's been unstable since about > August of last year, what with all the security and other changes. That's almost 9 months now! My impression is that the security backend has matured (Dmitryi, Adam, please correct me if I'm wrong) and has reached a stable state again. Apart from this, I was fighting to make sure that no new features are added to eXist core while it is stabilizing - and I think I was successful. Changes in extension modules which you can disable are not as critical. The general idea was to branch of trunk once we agree it is feature complete and stabilize it towards a 1.6 release. Wolfgang |
From: Dannes W. <da...@ex...> - 2011-04-21 15:40:19
|
Andrzej On Thu, Apr 21, 2011 at 5:21 PM, Andrzej Jan Taramina <an...@ch...>wrote: > Any idea when trunk might be stable enough for production use again? It's > been unstable since about > August of last year, what with all the security and other changes. That's > almost 9 months now! > actually I think that most issues are solved right now, like the recent stability things wolf fixed last week (tough job!), the permissions/metadata and the user authentication redesign of Dimitry. I hope my impressions are OK :-) ; maybe a good excuse for a developer telecon tomorrow cheers Dannes -- eXist-db Native XML Database - http://exist-db.org Join us on linked-in: http://www.linkedin.com/groups?gid=35624 |
From: Andrzej J. T. <an...@ch...> - 2011-04-21 15:21:19
|
Any idea when trunk might be stable enough for production use again? It's been unstable since about August of last year, what with all the security and other changes. That's almost 9 months now! Thx! -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Andrzej J. T. <an...@ch...> - 2011-04-21 15:15:39
|
I would like to know why the new Cryptographic extension (from Claudius) does not follow the typical extension conventions where the source is found under /extensions/src/modules/org/exist/xquery/modules? It is located in it's own source tree under /extensions/src/modules/ro/kuberam, which seems like quite a departure from normal. This module also does not include the standard eXist license header and is licensed under different terms than the rest of our extension modules. I my opinion that it should be consistent with all the other extensions, if it is to be part of the main eXist source tree in SVN. If it is a proprietary extension, then it should not be part of the eXist svn code base and should be hosted elsewhere. -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |
From: Adam R. <ad...@ex...> - 2011-04-21 09:30:11
|
Cool so an XForms approach :-) When discussing with Achille on IRC last night, he was just using HTML Forms, so I suggested that he use jQuery on the client side to listen to events generated by changes in the first select box, then do an ajax request to eXist-db to get the data for the second select box. On 21 April 2011 11:14, Raja <m.r...@ni...> wrote: > Hi Achille !!! > > use the attached sample code for your dependent combo requirement... Enjoy > .. > > By > Rajamani marimuthu. > XRX Team > OTC > > > On 04/21/11, *achille mbougueng * <sim...@ya...> wrote: > > hello, > I use exist an i have an rdf file > I have two select in a form. > the first takes a simple select and the second a select multiple.i would > like the values taken by the second select to be linked to those of the > first select > > example: > initially the 2nd select does(and displays) nothing it is empty > the first select contains math and computer > if a user choose math in the first, the second displays just arithmetic, > geometry and statistics, > > > if a user choose computer the second displays just networks and web > development > > how to do it please? > ------------------------------ > Achille MBOUGUENG > Tel:+ 216 2242 16 44 > skype: sim_patricx > web: achillesimo.creativdev-mada.com > www.andandoo.info <http://achillesimo.creativdev-mada.com/> > > > > -- > Rajamani Marimuthu > Junior Research Fellow-JRF > NIC -Open Technology Centre > Rajaji Bhavan > Besant Nagar, > Chennai - 90 > Cell : 9677192096 > > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Adam R. <ad...@ex...> - 2011-04-20 14:11:16
|
I have bumped up the version number of the .dbx files format in trunk as of this morning. The change actually occured last week, but I did not realise at that point this would result in differing binary files. As such if you see a problem with .dbx files version when starting eXist-db trunk in your exist.log, then you would need to do a full export and import. However I would recommend you do this if you are upgrading to trunk from last week or later... Thanks Adam. -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
From: Adam R. <ad...@ex...> - 2011-04-18 08:28:42
|
util:eval is not part of the specs, so don't worry about it is the same way. On 16 Apr 2011 09:12, "Dmitriy Shabanov" <sha...@gm...> wrote: > On Sat, Apr 16, 2011 at 10:16 AM, Pierrick Brihaye < pie...@fr... >> wrote: > >> >> Le 16/04/2011 07:02, Dmitriy Shabanov a écrit : >> >> >> Yes, eXist's xquery engine resolve function on name & number of >>> parameters, but do not put types in account. Well, it should be >>> simple to improve ... >>> >> >> Keep quiet gentlemen :-) In the XQuery specs, we have : >> >> It is a static error [err:XQST0034] if the expanded QName and arity >>> (number of arguments) of the declared function are equal (as defined >>> by the eq operator) to the expanded QName and arity of another >>> function in function signatures. >>> >> >> (maybe stupid, but so are the specs) >> > > To finish picture: eXist do not raise XQST0034 at all :-) ... and will not > ... of course, this is my guess, but I don't see a way out for util:eval use > case > >> > -- > Dmitriy Shabanov |
From: Dannes W. <di...@ex...> - 2011-04-16 20:47:22
|
Glad we have you to verify suggestions against the specs! On 16 apr. 2011, at 07:16, Pierrick Brihaye <pie...@fr...> wrote: > Keep quiet gentlemen :-) In the XQuery specs, we have : > >> It is a static error [err:XQST0034] if the expanded QName and arity >> (number of arguments) of the declared function are equal (as defined >> by the eq operator) to the expanded QName and arity of another >> function in function signatures. |
From: Dmitriy S. <sha...@gm...> - 2011-04-16 07:12:43
|
On Sat, Apr 16, 2011 at 10:16 AM, Pierrick Brihaye <pie...@fr... > wrote: > > Le 16/04/2011 07:02, Dmitriy Shabanov a écrit : > > > Yes, eXist's xquery engine resolve function on name & number of >> parameters, but do not put types in account. Well, it should be >> simple to improve ... >> > > Keep quiet gentlemen :-) In the XQuery specs, we have : > > It is a static error [err:XQST0034] if the expanded QName and arity >> (number of arguments) of the declared function are equal (as defined >> by the eq operator) to the expanded QName and arity of another >> function in function signatures. >> > > (maybe stupid, but so are the specs) > To finish picture: eXist do not raise XQST0034 at all :-) ... and will not ... of course, this is my guess, but I don't see a way out for util:eval use case > -- Dmitriy Shabanov |
From: Dave F. <dav...@gm...> - 2011-04-16 05:46:38
|
Aw, son of a gun! So, with the item() parameter, I can use typeswitch to delegate to various sub-functions as I see fit. Basically, what I need is a base function that handles the grunt work, which I already have. With an ID (integer) parameter I can construct a string that points to an XML file via an XMLDB URL. Allister's suggestion makes the most sense since I can construct a sort of "degenerate" function that all variances will call upon. As such, I have my solution. Tomorrow will be glorious! On Sat, Apr 16, 2011 at 12:13 AM, Alister Pillow <gsp...@gm...>wrote: > Hi Dave, > Yes - it's a language issue: > [Definition: Function signatures. This component defines the set of > functions that are available to be called from within an expression. Each > function is uniquely identified by its expanded QName and its arity (number > of parameters).] > > So Dimitry's suggestion (to edit the source) is possible, but it would be > breaking the rules. > > An alternative is to define one function that takes any parameter, and use > the typeswitch expression to deal with them. > declare function local:my-function ($param as item()) { > typeswitch($param) > case $a as xs:integer return $a + 1 > case $a as xs:string return upper-case($a) > default return "unknown" > }; > > I hope that is useful. > > Alister. > > > On 16/04/2011, at 2:03 PM, Dave Finton wrote: > > > I'd like to define a function (or two) where they can be called one of > the following ways: > > > > dave-module:my-function ($my-string as xs:string) > > dave-module:my-function ($my-integer as xs:integer) > > > > The problem is that eXist (or perhaps it's the XQuery language in > general) doesn't like this, as it seems unless I define functions based on > the *number* of parameters as opposed to the *type*, I get an error. No > matter how I try, the interpreter seems to want one over the other. My > question: Is there a way to not have to do any obvious workarounds to get > this to work? Right now all I can do is to define the functions as follows, > which does work: > > > > dave-module:my-function-s ($my-string as xs:string) > > dave-module:my-function ($my-integer as xs:integer) > > > > (note the "-s" at the end of the function name to denote the fact that it > is expecting a string) > > > > I'm using eXist 1.5 trunk (I forget the revision number off the top of my > head). My apologies if this is a neophyte question, but after a day of > rummaging through the documentation, I'm kind of at a loss. > > -- > > David Finton > > > ------------------------------------------------------------------------------ > > Benefiting from Server Virtualization: Beyond Initial Workload > > Consolidation -- Increasing the use of server virtualization is a top > > priority.Virtualization can reduce costs, simplify management, and > improve > > application availability and disaster protection. Learn more about > boosting > > the value of server virtualization. > http://p.sf.net/sfu/vmware-sfdev2dev_______________________________________________ > > Exist-open mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- David Finton |
From: Pierrick B. <pie...@fr...> - 2011-04-16 05:16:55
|
Hi, Le 16/04/2011 07:02, Dmitriy Shabanov a écrit : > Yes, eXist's xquery engine resolve function on name & number of > parameters, but do not put types in account. Well, it should be > simple to improve ... Keep quiet gentlemen :-) In the XQuery specs, we have : > It is a static error [err:XQST0034] if the expanded QName and arity > (number of arguments) of the declared function are equal (as defined > by the eq operator) to the expanded QName and arity of another > function in function signatures. (maybe stupid, but so are the specs) So, there is only one solution if you want to use the same function name. Type the argument to the common supertype. Then, you can use a typeswitch instruction to define the user-defined processings (including type errors if you wish so). Cheers, p.b. |
From: Alister P. <gsp...@gm...> - 2011-04-16 05:14:00
|
Hi Dave, Yes - it's a language issue: [Definition: Function signatures. This component defines the set of functions that are available to be called from within an expression. Each function is uniquely identified by its expanded QName and its arity (number of parameters).] So Dimitry's suggestion (to edit the source) is possible, but it would be breaking the rules. An alternative is to define one function that takes any parameter, and use the typeswitch expression to deal with them. declare function local:my-function ($param as item()) { typeswitch($param) case $a as xs:integer return $a + 1 case $a as xs:string return upper-case($a) default return "unknown" }; I hope that is useful. Alister. On 16/04/2011, at 2:03 PM, Dave Finton wrote: > I'd like to define a function (or two) where they can be called one of the following ways: > > dave-module:my-function ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer) > > The problem is that eXist (or perhaps it's the XQuery language in general) doesn't like this, as it seems unless I define functions based on the *number* of parameters as opposed to the *type*, I get an error. No matter how I try, the interpreter seems to want one over the other. My question: Is there a way to not have to do any obvious workarounds to get this to work? Right now all I can do is to define the functions as follows, which does work: > > dave-module:my-function-s ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer) > > (note the "-s" at the end of the function name to denote the fact that it is expecting a string) > > I'm using eXist 1.5 trunk (I forget the revision number off the top of my head). My apologies if this is a neophyte question, but after a day of rummaging through the documentation, I'm kind of at a loss. > -- > David Finton > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev_______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open |
From: Dmitriy S. <sha...@gm...> - 2011-04-16 05:02:41
|
Yes, eXist's xquery engine resolve function on name & number of parameters, but do not put types in account. Well, it should be simple to improve ... do you have svn access? If you haven't I can make one and make this changers & you will test them (hope with others). On Sat, Apr 16, 2011 at 9:33 AM, Dave Finton <dav...@gm...> wrote: > I'd like to define a function (or two) where they can be called one of the > following ways: > > *dave-module:my-function ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer)* > > The problem is that eXist (or perhaps it's the XQuery language in general) > doesn't like this, as it seems unless I define functions based on the > *number* of parameters as opposed to the *type*, I get an error. No matter > how I try, the interpreter seems to want one over the other. My question: Is > there a way to not have to do any obvious workarounds to get this to work? > Right now all I can do is to define the functions as follows, which does > work: > > *dave-module:my-function-s ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer)* > > (note the "-s" at the end of the function name to denote the fact that it > is expecting a string) > > I'm using eXist 1.5 trunk (I forget the revision number off the top of my > head). My apologies if this is a neophyte question, but after a day of > rummaging through the documentation, I'm kind of at a loss. > -- > David Finton > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > > -- Dmitriy Shabanov |
From: Dave F. <dav...@gm...> - 2011-04-16 04:33:37
|
I'd like to define a function (or two) where they can be called one of the following ways: *dave-module:my-function ($my-string as xs:string) dave-module:my-function ($my-integer as xs:integer)* The problem is that eXist (or perhaps it's the XQuery language in general) doesn't like this, as it seems unless I define functions based on the *number* of parameters as opposed to the *type*, I get an error. No matter how I try, the interpreter seems to want one over the other. My question: Is there a way to not have to do any obvious workarounds to get this to work? Right now all I can do is to define the functions as follows, which does work: *dave-module:my-function-s ($my-string as xs:string) dave-module:my-function ($my-integer as xs:integer)* (note the "-s" at the end of the function name to denote the fact that it is expecting a string) I'm using eXist 1.5 trunk (I forget the revision number off the top of my head). My apologies if this is a neophyte question, but after a day of rummaging through the documentation, I'm kind of at a loss. -- David Finton |