copy
Copy Resource Accessor API
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

copy

Used to assign one resource to another.

Module

urn:org:ten60:netkernel:ext:dpml

Definition

Format

<instr>
  <type>copy</type>
  <operand>foo.xml</operand>
  <target>bar.xml</target>
</instr>

Syntax

ElementRulesDescription
typeMandatory copy
operandMandatory Fragment OKthe resource to be replicated
targetMandatory Fragment OKthe target resource

The copy accessor assigns the value of one resource to another. If the resource that is being assigned to supports sinking of data then the data will be sunk. This primative operatorion is built into the DPML language.

Common uses include copying a static or transient resource to a variable. Replicating a resource to the response.

Example

Replicate to a Variable

<idoc>
  <instr>
    <type>copy</type>
    <operand>foo.xml</operand>
    <target>var:vbar</target>
  </instr>
</idoc>

An example of copying a resource into a variable

Replicate a Variable to the Response Document

<idoc>
  <instr>
    <type>copy</type>
    <operand>foo.xml</operand>
    <target>var:vbar</target>
  </instr>
  <instr>
    <type>copy</type>
    <operand>var:vbar</operand>
    <target>this:response</target>
  </instr>
</idoc>

An example of copying a resource into a variable and then copy that variable to the response


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