I have been using VTD for some time now and it is great.
I have the following requirement for which I have not found a solution yet. I would be thankful for any help or hint.
When I execute the following xpath it doesnt return any result
The XML is
<?xml version="1.0" encoding="ISO-8859-1"?>
<CODE>BPP</CODE><DESCRIPTION>Building and Personal Property</DESCRIPTION>
<DESCRIPTION>Condo Unit Owners</DESCRIPTION>
Please let me know if you have any suggestion how to resolve this issue.
hi, will investigate and get back...
the problem is comfired and we are working to provide you with a fix asap..
thanks so much for pointing that out!
Thank you for your prompt action
I found an alternate way to resolve this issue. but
it would be better if you would provide a fix
when I replace FILTER='' with FILTER[not(text())]
it works fine.
by the way, !='' also doesnt return any value
Can you go to CVS (the web interface) and check out BinaryExpr.java
and compile it?
the latest fix is in...
Thanks for the fix.
Everything works fine now
I would like to know where/how i can downlaod the jar file with this fix.This works fine in my machine but usually IT directly download jar(vtd-xml.jar) for deployment purpose.
we have no problem making a jar for you... but the thing is whether I have to make it publicly available or not... so the question is when to do 2.6 ...
it seems that still there is an issue.
//Rating/Form_Type[FILTER=''] returns all records.
and also check for !=''
Ok, check out binaryExpr.java and let me know what you think of it...
more testing has been done on my end...
I am migrating an application which is in production from SAX parser to VTD-XML.
we run 100's of xpath to calculate premium.
After your last fix that xpath works fine but premium goes wrong. it was fine earlier.
it seems this fix creates another issue.
please take a look at your last fix.
Can you be specific on the premium issue? you can talk to me directly
on IM if that helps you to get a quick answer...
my msn iM id: firstname.lastname@example.org
the same for skype I believe
Thanks fot your reply.
I dont have skype in the office.I try to contact you
I dont know exactly which xpath return wrong results. but we execute about 500 xpath to calculate premium. when i put this latest java file
premium becomes 0. earlier it was fine but that particular xpath was wrong.one or some of xpath doesnt return expected result.
email me with the test case that you can come up with...
I dont know which xpath doesnt return expected results. there are more than 500 xpath.
but after your last fix only this happens. if your last fix is only few lines, please double check
before last fix
//Rating/Form_Type[FILTER=''] returns all the records.
after the fix
//Rating/Form_Type[FILTER=''] returns expected results.
but some other xpath doesnt return expected results.
i dont know which xpath goes wrong if i know the xpath i would have sent it.
Anyway i double check. At the same time please double check your last fix.
r u sure the original results are correct and expected?
This is the issue.
<?xml version="1.0" encoding="utf-8"?>
//Rating_Rule[RULENAME='rateLOB' and (EFFECTIVE_DATE='' or translate(substring-before(EFFECTIVE_DATE," "),'-','')<='20090627') and (EXPIRY_DATE='' or translate(substring-before(EXPIRY_DATE," "),'-','')>='20090627')]
This xpath works fine in sax parser. but doesnt return any result when using vtd-xml.
Please take a look.
r u sure this is the right xpath?
I think the following boolean expression always evaluate to false except for the value of 20090627, in other words (a>= b) and (a<=b) should evaluate to false except that a = b..
(EFFECTIVE_DATE='' or translate(substring-before(EFFECTIVE_DATE," "),'-','')<='20090627')
(EXPIRY_DATE='' or translate(substring-before(EXPIRY_DATE," "),'-','')>='20090627')
ok... will get back asap
This is correct and
it is like a>=b and c<=b
one is EFFECTIVE_DATE and other one is EXPIRY_DATE.
Just checked in UnionExpr.java and FuncExpr.java in
com.ximpleware package, the fix works well on my end.
pls confirm on your side asap
I take all latest classes and recompiled
Everything works fine and i am doing some more test.
thanks for the fix