xpatheval
XML Technologies
Release Notes
attachGoldenThread
cast
copy
cutGoldenThread
cwu
delete
dpml
dump
entrypoint
exists
expire
fls
guid
hotRestart
HTTPCookie
HTTPRedirect
isUnix
locationToXPath
lock/unlock
log
loglevel
luceneIndex
luceneSearch
mapper
mapper-export
md5
mls
netkernel:*
new
Orchextra
org.ten60.util.aspell
org.ten60.util.image.SVG2PNG
org.ten60.util.image.Text2PNG
org.ten60.util.image.xchart
plainTextToXHTML
regex
relativizeURI
requestWithArgs
resolveURI
serialize
sleep
sqlBatch
sqlBooleanQuery
SQLEncodeElement
SQLEscapeXML
sqlQuery
sqlUpdate
stm
stopWatch
StringToCanonicalString
throw
toRelaxNG
trace
validateDTD
validateRNG
validateSchematron
validateXSD
xacml
xform
XHREFlinker
XHTMLredirect
XHTMLTidy
xinclude
xmltidy
xpatheval
xpur
xquery
xrl
xsign
xslfo-fop
xslfo-fop
xslt
xverify
License
Change History
NetKernel History
Acknowledgements

xpatheval

Used to evaluate an xpath expression.

Module

urn:org:ten60:netkernel:ext:xml:ura

Definition

Format

<instr>
  <type>xpatheval</type>
  <operand>foo.xml</operand>
  <operator>bar.xml</operator>
  <target>this:response</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory xpatheval
operandMandatory the resource to be tested
operatorMandatory a canonical XPath
targetMandatory Fragment OKthe target resource

The xpatheval accessor is used to perform a boolean test of an xpath expression on the operand. The operator contains a canonical XPath expression to be evaluated on the operand. xpatheval is often used for controlling process flow.

The truth of an XPath expression can include the document tree matches an xpath location, the value of a location matches a given value or an XPath function matches some value, or a combination of all of these. More information is avaliable here

xpatheval returns a canonical boolean document: <b>t</b> true, or <b>f</b> false

Example

Test if an Attribute has a given value

<idoc>
  <instr>
    <type>xpatheval</type>
    <operand>
      <a>
        <b name="foo" />
      </a>
    </operand>
    <operator>
      <xpath>//b[@name='foo']</xpath>
    </operator>
    <target>this:response</target>
  </instr>
</idoc>

An example of using xpatheval to test if the operand document has an element <b> with an attribute name with value 'foo'. In this example the xpatheval returns true in the form of a canonical boolean document <b>t</b>


(C) 2003, 1060 Research Limited
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited