[DAISY] Updated: Tags
| Newsgroups | gmane.text.xml.cocoon.documentation |
|---|---|
| Message-ID | <[email protected]> |
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/1391.html
Document ID: 1391
Branch: main
Language: default
Name: Tags (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 6/17/08 1:09:02 PM
Updated by: Kamal Bhatt
A new version has been created, state: draft
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 18132 bytes (previous version: 16646 bytes)
Content diff:
(494 equal lines skipped)
letter = g <br/>
</pre>
+++ <h2>attribute</h2>
+++
+++ <p>The <tt>attribute </tt>tag allows the dynamic addition of attributes to any
+++ element tag. This includes dynamic specification of the attribute name.</p>
+++
+++ <pre><jx:attribute name="AttributeName" value="Attribute Value"/>
+++
+++ <jx:attribute name="AttributeName">Attribute Value</jx:attribute></pre>
+++
+++ <p>For example,</p>
+++
+++ <pre><Test>
+++ <jx:var name="foo" value="bar"/>
+++ <jx:attribute name="${attrName} value="Expression"/>
+++ </Test>
+++ </pre>
+++
+++ <p>The above template produces the following output:</p>
+++
+++ <pre><Test bar="tar"/>
+++ </pre>
+++
+++ <h2>element</h2>
+++
+++ <p>The <tt>element</tt> tag allows the dynamic addition of element. This
+++ includes the dynamic specificatgion of the element name.</p>
+++
+++ <pre><jx:element name="AttributeName" [uri="NamespaceUri"] [prefix="Prefix"]>
+++ ...
+++ </jx:element>
+++ </pre>
+++
+++ <p>If a prefix is specified, then a namespace must also be specified. However, a
+++ namespace may be specified without a prefix.<tt><tt><tt> <tt>jx:element
+++ </tt></tt></tt></tt>may be used in conjunction with<tt> jx:attribute</tt>.</p>
+++
+++ <p>For example,</p>
+++
+++ <pre><jx:element name="AttributeAndChildNode">
+++ <jx:attribute name="attribute" value="attr"/>
+++ <ChildNode>A</ChildNode>
+++ </jx:element></pre>
+++
+++ <p>The above template produces the following output:</p>
+++
+++ <pre><AttributeAndChildNode attribute="attr">
+++ <ChildNode>A</ChildNode>
+++ </AttributeAndChildNode></pre>
+++
<h2>eval</h2>
<p>The <tt>eval</tt> tag permits dynamic evaluation of custom tags.</p>
(71 equal lines skipped)