[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] get call fix



Hi Chris,

the statement:

*[((//metadata/SpecificObjectData/tst_meta/type='CLASSINFO') ....]

would take all elements (since you set * on the left of the square brackets) and submit the XPATH expression inside the square brackets. The later would give back a boolean true or false. If the expression returns true, then the COMPLETE element for which the statement was true is added to the result tree. In your case you would get the complete xmlBlaster element plus the complete key element and the complete metadata element as the result tree.

So the solution here is to have a more selective location path on which to submit the square bracket expression (i.e. filter away already from the beginning the root element 'xmlBlaster' which we know contains a lot of system specific 'trash'). Specifying /xmlBlaster/key/metadata[...] does exaclty that.

Michele


Chris Jones wrote:
Your suggestion removed the unwanted results, but I am wondering why?

Using *[((metadata/.....))] should have returned only results that matched and the <key oid="..."> </key> nodes did not contain any matching tree with metadata/... .

 Could you explain how adding /xmlblaster/key/metadata fixed this?

Thanks,

Chris




Your query is not correct, please try:
//metadata/SpecificObjectData[tst_meta/type='CLASSINFO' and beginning_date_time_group/hour_time=21]
or
/xmlBlaster/key/metadata/*[((//metadata/SpecificObjectData/tst_meta/type='CLASSINFO') and (//metadata/SpecificObjectData/beginning_date_time_group/hour_time=21))]
have a peaceful weekend,
Michele and Marcel (after some discussions :-)





--
Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://www.geocities.com/laghi2000
http://www.xmlBlaster.org