[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] questions on XmlBlaster XPATH subscriptions
Peter.Weinstein at Altarum.org wrote:
Hi,
I'm having trouble finding a description of the semantics of XPATH
subscriptions. I have several questions:
1) Can the XPATH key include a data value, as opposed to an attribute
value? For example, if a published message includes:
<xmlBlaster>
<Header>
<Attribute>
<label>evidenceAssembly1234</label>
will I receive this messsage with an XPATH subscription with syntax
something along the lines of:
/xmlBlaster/Header/Attriute/label[starts-with('evidenceAssembly')]
Yes, but you should start it with // as the hierarchy looks like
http://www.xmlblaster.org/FAQ.html#XPATH
For better performance use absolute XPATH like
/xmlBlaster/key/xmlBlaster/Header/Attriute/label[starts-with('evidenceAssembly')]
2) Can the XPATH key include multiple criteria, such that all must be true?
All must be true, it is nothing else than XPATH
3) Will the content of messages selected by an XPATH key include the entire
messages as published (as opposed to subtrees identified by the XPATH key)?
A message consists of a 'key' a 'qos' and a 'content'
The 'content' is never touched by xmlBlaster and delivered as is.
The 'key' of the topic is not changed as well.
If you need a full text search (for example your 'content' shall
be used to filter) you need to use a MIME plugin:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/mime.plugin.access.xpath.html
or for regex:
http://www.xmlblaster.org/xmlBlaster/doc/requirements/mime.plugin.access.regex.html
4) Does documentation or demo code exist that covers XPATH semantics well?
See above,
in
xmlBlaster/testsuite/data/xml
there are some xml files i used to play with, for example:
java DomQueryTest Agent.xml "xmlBlaster/key[ at oid='2' or at oid='3']"
enjoy,
Marcel
Thanks for your help!
Peter
--------------------------------------
Peter Weinstein, Ph.D.
Information Technology Scientist
Altarum Institute
734-302-4701
http://www.altarum.org
http://www.umich.edu/~peterw/
"Those who can, build." - Robert Moses
--------------------------------------
--
http://www.xmlBlaster.org