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 |