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

Re: [xmlblaster] Xpath problem with filter...



Ciao Valerio,
I tried the xpath query and it works OK by me. Could it be that you change the key of an existing topic for each published message to that topic ?


The key of the message is invariant: it is used to specify the topic only (not the particular message instance). The first message published will decide what key the topic will have. This key is stored in a big dom tree on the first publish. Thereafter it is left untouched. When you publish a second message on the same topic and you decide to change the key (i.e.the same oid but different client tags), the key's content is ignored but it is passed untouched to the subscribing clients.


So in your case you need to subscribe with the xpath query to select the topics on which you are interested in. If you then need a further selection on a message instance basis (like you have in JMS) then the right place to do it would be to use an access plugin (I_AccessFilter) to filter away the message updates which you are not interested in.


Saluti
Michele


Valerio Parola wrote:
I need help.
I like to make a subscribe with a xpath filter to extract all message with a
particular tag.
My messages have this structure:

<key oid='pub'>
    <prova name='a different name'/>
</key>
<qos>
....
</qos>

or

<key oid='bar'>
    <prova name='a different name'/>
</key>
<qos>
....
</qos>

I subscribed this message:

<key oid='' queryType='XPATH'>
//key/prova[ at name='my name']
</key>
<qos><history numEtries='-1'/> </qos>

The server answers with all messages of the one subscribed  topic, but
I need every messages from every topic but with a specific name attribute in
the tag prova.
I can't understand what is my mistake?
Thank you!
Valerio




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