[xquery-talk] XPath Expression help
Todd Ditchendorf
itod at apple.com
Wed Jul 19 13:08:36 PDT 2006
I realize this is an XQuery list, but I know that this list is
particularly good at constructing tricky XPath expressions, so I hope
you don't mind.
I need some help constructing an XPath. I am currently restricted to
XPath 1.0 syntax.
I have a document like this:
<dict>
<key>AllowedKey1</key>
<value/>
<key>AllowedKey2</key>
<value/>
<key>AllowedKey3</key>
<value/>
<key>UnrecognizedKey</key>
<value/>
</dict>
So I have fixed set of allowed <key> element string-values --
('AllowedKey1', 'AllowedKey2', 'AllowedKey3')
It is not required that all three be present. 0-unbounded allowed key
values may be present.
However, if there is a single key outside of that set, I would like
to detect it.
Can anyone create an XPath 1.0 expression that will return true if an
unrecognized key string-value is present?
Todd Ditchendorf
Software Engineer
itod at apple.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20060719/cac94af8/attachment.htm
More information about the talk
mailing list