Sunday, 2024-12-22, 2:27 PM
Welcome Guest | RSS
Farhan Khalid
Main | Context Parameters - Forum | Registration | Login
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Context Parameters
farhan411
Messages: 288
Group: Administrators
Title: Admin
Reputation: 0
Status: Offline

Awards: 1Loading awards ...
Date:
Tuesday,
2009-02-24,
6:44 PM

Message # 1
Context Parameters
All Echo commands use the same technique of extending the evaluation context and in using the evaluation context to obtain named parameters. The parameter named "userID", because it is used for determining user permissions, is special, and can only be bound by the Echo processor's environment.
Parameters are obtained from an Echo element's context. A parameter name may be bound to either a string or an XML document.
In the case of string parameter binding, The string is evaluated as an expression, and substitution may be performed at the time the parameter is obtained from the context.

Code
<e:toString><e:quote><e:echo xmlns:e="http://namespaces.xmlecho.org/echo">
     <!-- gets the same document 6 times using different techniques for param binding -->
      
     <!-- one way -->
     <e:itemGet name="/test/myDoc.xml" />
      
     <!-- another way -->
     <e:itemGet>
       <e:context name="/test/myDoc.xml" />
     </e:itemGet>
      
     <!-- a third way lets me use non-legal XML attribute name for param name-->
     <e:itemGet>
       <e:context>
         <e:param name="name" value="/test/myDoc.xml"/>
       </e:context>
     </e:itemGet>
      
     <!-- a fourth way value is content of param -->
     <e:itemGet>
       <e:context>
         <e:param name="name">/test/myDoc.xml</e:param>
       </e:context>
     </e:itemGet>

     <!-- parameters are inherited from our ancestor or calling environment -->
     <e:echo>
       <e:context>
         <e:param name="name">/test/myDoc.xml</e:param>
       </e:context>
       <e:itemGet/>
     </e:echo>

     <!-- parameters are evaluated with a very simple expression language-->
     <e:echo>
       <e:context>
         <e:param name="prefix">/test/myDoc</e:param>
         <e:param name="suffix">xml</e:param>
       </e:context>

       <e:itemGet name="{$prefix}.{$suffix}" />
     </e:echo>
   </e:echo>
paramSet
<!-- modifier/commentary element -->
<e:paramSet>
     <!-- param  element --> *
</e:paramSet>

Provides a list of parameter names, and possibly default values, for context parameters which are expected to be referenced when the containing element is evaluated. In the case of xslt, the parameters are made available to the xslt transformation engine.
documentation
Provided to allow developer and/or user documentation to be embedded within ECHO documents. There are no constraints on the contents of this element.
meta
Provided to allow arbitrary meta-data to be embedded within ECHO documents. There are no constraints on the contents of this element.


This user has not applied a signature yet.
HTML code to this post
BB-code to this post
Direct link to this post
  • Page 1 of 1
  • 1
Search:

Copyright MyCorp © 2024

Hosted by uCoz