xpur
XML Utilities
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

xpur

Used to generate a Canonical URI from a Canonical XPath reference to a URI.

Module

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

Definition

Format

<instr>
  <type>xpur</type>
  <operand>foo.xml</operand>
  <operator>
    <xpath>/path/to/uri</xpath>
  </operator>
  <target>var:uri</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory xpur
operandMandatory the resource containing a URI
operatorMandatory a canonical XPath document
targetMandatory Fragment OKthe target resource

The xpur accessor returns a canonical URI extracted from an XPath location in the operand document. The XPath location is supplied by the operator as a canonical XPath document.

Documents frequently contain URI's that are needed for subsequent processing. This accessor extracts the value at a given xpath location and casts it to a canonical URI.

Here's an example...

<instr>
  <type>xpur</type>
  <operand>
    <example>
      <someresource the_uri_to_my_resource="file:/some/resource.xml">
        <desc>My resource</desc>
      </someresource>
    </example>
  </operand>
  <operator>
    <xpath>/example/someresource/@the_uri_to_my_resource</xpath>
  </operator>
  <target>var:uri</target>
</instr>

Produces a value in var:uri...

<uri>file:/some/resource.xml</uri>

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