cast
Sets the mimetype of a resource
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > cast

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:ext:sys

Definition

Active URI Base

active:cast

Format

<instr>
  <type>cast</type>
  <operand>foo.xml</operand>
  <operator>
    <cast>
      <mimetype>text/plain</mimetype>
    </cast>
  </operator>
  <target>this:response</target>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory cast
operandMandatory the resource to be serialized to the log
operatorMandatory the cast specification
targetMandatory the target resource

The cast accessor is used to specify the Mimetype of the operand resource. This can be useful when a representation of a resource can have more than one equally valid form. For example an XML resource could be equally valid as text/xml, text/html, text/xhtml or text/plain depending upon the context of the response.

Cast does not change the resource it simply changes the meta data associated with a resource.

Operator Syntax

The cast accessor takes an operator which specifies the cast.

<cast>  <mimetype>foo/bar</mimetype>
</cast>

mimetype is any valid mimetype.


(C) 2003, 1060 Research Limited
© 2003-2005, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.