Difference between revisions of "Artefact:Template/org/oogenerator/examples/tutorial/Example0000 Unicode"
From OOModels
< Artefact:Template | org | oogenerator | examples | tutorial
Jump to navigationJump to search
AndreasLeue (talk | contribs) |
AndreasLeue (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Metabox | {{Metabox | ||
| Meta_Type | | Meta_Type = Type:org/oogenerator/Template/2.0 | ||
| Meta_Domain | | Meta_Domain = Domain:it/development/formatting | ||
| Meta_Category = Type:org/oomodels/wiki/Template | | Meta_Category = Type:org/oomodels/wiki/Template | ||
| Meta_Download = true | | Meta_Download = true | ||
| Meta_Maturity = final | | Meta_Maturity = final | ||
| | | Meta_AddTypeToCategory = true | ||
| | | Meta_AddCategoryToCategory = true | ||
}} | }} | ||
Line 28: | Line 28: | ||
available, which transforms one syntax into the other in both directions. | available, which transforms one syntax into the other in both directions. | ||
« java code » <% java code %> | ------------------------------------------------------------------------- | ||
⊰ comment ⊱ <%-- comment --%> | |||
⊰✉ message ⊱ <%--#{message} message --%> | Here is a list of correspondences between Unicode and ASCII syntax: | ||
⊰✏ doclet ⊱ <%--#{doclet} doclet --%> | |||
◂ print code ▸ <%= print code %> | <span class="oogcode">« java code »</span> <% java code %> | ||
◂ print code | <span class="oogcomment">⊰ comment ⊱</span> <%-- comment --%> | ||
◂⊙▸ <%=#{current}()%> | <span class="oogcomment">⊰✉ message ⊱</span> <%--#{message} message --%> | ||
▼ file level code (import) ▼ <%@ file level code (import) %> | <span class="oogcomment">⊰✏ doclet ⊱</span> <%--#{doclet} doclet --%> | ||
▲ class level code (declaration) ▲ <%! class level code (declaration) %> | <span class="oogexpression">◂ print code ▸</span> <%= print code %> | ||
⊏ template code ⊐ <%? template code ?%> | <span class="oogexpression">◂ print code <span class="oogencoding">⌘encoding</span>▸</span> <%= print code %%encoding%> | ||
⊏ signature(...) ⊐ <%? signature(...) ?%> | <span class="oogexpression">◂⊙▸</span> <%=#{current}()%> | ||
⊏ ➜ somepart(...) ⊐ <%? #{insert} somepart(...) ?%> | <span class="oogfilecode">▼ file level code (import) ▼</span> <%@ file level code (import) %> | ||
⊏ ⌘ ⊐...⊏ /⌘ ⊐ <%? %% ?%>...<%? /%% ?%> | <span class="oogclasscode">▲ class level code (declaration) ▲</span> <%! class level code (declaration) %> | ||
<span class="oogtemplatecode">⊏ template code ⊐</span> <%? template code ?%> | |||
<span class="oogtemplatecode">⊏ signature(...) ⊐</span> <%? signature(...) ?%> | |||
<span class="oogtemplatecode">⊏ ➜ somepart(...) ⊐</span> <%? #{insert} somepart(...) ?%> | |||
◂ recoded ⌘xml/ | <span class="oogtemplatecode">⊏ <span class="oogencoding">⌘</span> ⊐</span>...<span class="oogtemplatecode">⊏ /<span class="oogencoding">⌘</span> ⊐</span> <%? %% ?%>...<%? /%% ?%> | ||
⊏ Ⓣ somepart(...) ⊐...⊏ /Ⓣ ⊐ <%? #{template} somepart(...) ?%>...<%? /#{template} ?%> | <span class="oogexpression">◂<span class="oogpath">‖"Ⓧ/./path/expression"</span>▸</span> <%= ::"XPath/./path/expression"%> | ||
⋜ Java Template ⋝ <{ Java Template }> | <span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/..."</span>▸</span> <%= ::"Property/..."%> | ||
<span class="oogexpression">◂<span class="oogpath">‖"✦/..."</span>▸</span> <%= ::"XModel/..."%> | |||
⋖ tag(a,b,c) ⋗ <@ tag(a,b,c) @> | <span class="oogexpression">◂ recoded <span class="oogencoding">⌘xml/html</span>▸</span> <%= recoded %%xml/html%> | ||
<span class="oogtemplatecode">⊏ Ⓣ somepart(...) ⊐</span>...<span class="oogtemplatecode">⊏ /Ⓣ ⊐</span> <%? #{template} somepart(...) ?%>...<%? /#{template} ?%> | |||
<span class="oogjavatemplate">⋜ Java Template ⋝</span> <{ Java Template }> | |||
⑊<span class="oogexpression">◂ escaped ⑊▸</span> <span class="oogexpression">◂ escaped ▸</span> | |||
<span class="oogtag">⋖ tag(a,b,c) ⋗</span> <@ tag(a,b,c) @> | |||
●(...){ ... }/● #{select}(...){ ... }/#{select} | |||
∃(...){ ... }/∃ #{exists}(...){ ... }/#{exists} | |||
⁇(...){ ... }/⁇ #{isvalid}(...){ ... }/#{isvalid} | |||
¬⁇(...){ ... }/¬⁇ #{isinvalid}(...){ ... }/#{isinvalid} | ¬⁇(...){ ... }/¬⁇ #{isinvalid}(...){ ... }/#{isinvalid} | ||
∅(...){ ... }/∅ #{empty}(...){ ... }/#{empty} | |||
¬∅(...){ ... }/¬∅ #{notempty}(...){ ... }/#{notempty} | ¬∅(...){ ... }/¬∅ #{notempty}(...){ ... }/#{notempty} | ||
⇾(...){ ... }/⇾ #{isa}(...){ ... }/#{isa} | |||
∀(...){ ... }/∀ #{for}(...){ ... }/#{for} | |||
∀(...∪...){ ... }/∀ #{for}(...#{union}...){ ... }/#{for} | |||
∀(...){ ➀{...}∨{...}/➀ ... }/∀ #{for}(...){ #{first}(){...}#{else}(){...}/#{first} ... }/#{for} | |||
∀(...){ ¬➀{...}∨{...}/¬➀ ... }/∀ #{for}(...){ #{notfirst}(){...}#{else}(){...}/#{notfirst} ... }/#{for} | |||
➀:(...) #{declarepass}(...) | |||
¶(...) /¶ #{indent}(...) /#{indent} | |||
Ⓡpattern=replacement | Ⓡpattern=replacement <nowiki>~~~</nowiki>pattern=replacement | ||
</div> |
Latest revision as of 08:56, 25 August 2008
Classification | |
---|---|
Type | Type:org/oogenerator/Template/2.0 |
Domain | Domain:it/development/formatting |
Category | Type:org/oomodels/wiki/Template |
Maturity | final |
More | |
Download Code | |
Namespace (more) | |
OOGenerator main package | |
create new pages |
Code[edit]
G-2.0-plain_java-1.0
Please note: the example templates given here contain Unicode characters.
They are used to make the syntax look cleaner and less clumsy. Yes, they
are used as control characters and delimiters.
It is important to use an appropriate unicode font to view them
correctly. Most moderately recent browsers should have no problem with
this, while some text editors might need tuning.
There is a pure ASCII alternative available which is functionally
fully equivalent, it does not look as pretty as the Unicode variant.
If you prefer to use the ASCII syntax, note that there is a converter
available, which transforms one syntax into the other in both directions.
------------------------------------------------------------------------- Here is a list of correspondences between Unicode and ASCII syntax: « java code » <% java code %> ⊰ comment ⊱ <%-- comment --%> ⊰✉ message ⊱ <%--#{message} message --%> ⊰✏ doclet ⊱ <%--#{doclet} doclet --%> ◂ print code ▸ <%= print code %> ◂ print code ⌘encoding▸ <%= print code %%encoding%> ◂⊙▸ <%=#{current}()%> ▼ file level code (import) ▼ <%@ file level code (import) %> ▲ class level code (declaration) ▲ <%! class level code (declaration) %> ⊏ template code ⊐ <%? template code ?%> ⊏ signature(...) ⊐ <%? signature(...) ?%> ⊏ ➜ somepart(...) ⊐ <%? #{insert} somepart(...) ?%> ⊏ ⌘ ⊐...⊏ /⌘ ⊐ <%? %% ?%>...<%? /%% ?%> ◂‖"Ⓧ/./path/expression"▸ <%= ::"XPath/./path/expression"%> ◂‖"Ⓟ/..."▸ <%= ::"Property/..."%> ◂‖"✦/..."▸ <%= ::"XModel/..."%> ◂ recoded ⌘xml/html▸ <%= recoded %%xml/html%> ⊏ Ⓣ somepart(...) ⊐...⊏ /Ⓣ ⊐ <%? #{template} somepart(...) ?%>...<%? /#{template} ?%> ⋜ Java Template ⋝ <{ Java Template }> ⑊◂ escaped ⑊▸ ◂ escaped ▸ ⋖ tag(a,b,c) ⋗ <@ tag(a,b,c) @> ●(...){ ... }/● #{select}(...){ ... }/#{select} ∃(...){ ... }/∃ #{exists}(...){ ... }/#{exists} ⁇(...){ ... }/⁇ #{isvalid}(...){ ... }/#{isvalid} ¬⁇(...){ ... }/¬⁇ #{isinvalid}(...){ ... }/#{isinvalid} ∅(...){ ... }/∅ #{empty}(...){ ... }/#{empty} ¬∅(...){ ... }/¬∅ #{notempty}(...){ ... }/#{notempty} ⇾(...){ ... }/⇾ #{isa}(...){ ... }/#{isa} ∀(...){ ... }/∀ #{for}(...){ ... }/#{for} ∀(...∪...){ ... }/∀ #{for}(...#{union}...){ ... }/#{for} ∀(...){ ➀{...}∨{...}/➀ ... }/∀ #{for}(...){ #{first}(){...}#{else}(){...}/#{first} ... }/#{for} ∀(...){ ¬➀{...}∨{...}/¬➀ ... }/∀ #{for}(...){ #{notfirst}(){...}#{else}(){...}/#{notfirst} ... }/#{for} ➀:(...) #{declarepass}(...) ¶(...) /¶ #{indent}(...) /#{indent} Ⓡpattern=replacement ~~~pattern=replacement