TemplateWith
TemplateWith["name"value,expr]
represents an element of a template object that evaluates expr after replacing TemplateSlot["name"] with value.
TemplateWith[{"name1"value1,"name2"value2, …},expr]
evaluates expr with a list of key-value pairs.
Details
- TemplateWith allows you to define local constants inside a TemplateObject.
- In an XMLTemplate, TemplateWith can be indicated using <wolfram:with var1="..." var2="...">...</wolfram:with>.
Examples
Basic Examples (1)
Using TemplateSlot:
Hold evaluation with TemplateExpression:
Use TemplateWith to transform TemplateSlot data:
Text
Wolfram Research (2014), TemplateWith, Wolfram Language function, https://reference.wolfram.com/language/ref/TemplateWith.html.
CMS
Wolfram Language. 2014. "TemplateWith." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TemplateWith.html.
APA
Wolfram Language. (2014). TemplateWith. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TemplateWith.html