1 / 8

樣板語言的定義

樣板語言的定義. 05/31. 目錄. 來源檔案 aebs:define aebs:if aebs:repeat aebs:replace onerror attribute. 樣板來源檔案. 樣板可以是 html 或 xhtml 檔案 Xhtml 是比較好的選擇,因為 xhtml 結構較為嚴謹. aebs:define. 定義樣板語言的變數用,範例 < aebs:define name=“var” value=“varvalue” /> < aebs:define name=“var1” value=“string:hello” />.

janina
Télécharger la présentation

樣板語言的定義

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 樣板語言的定義 05/31

  2. 目錄 • 來源檔案 • aebs:define • aebs:if • aebs:repeat • aebs:replace • onerror attribute

  3. 樣板來源檔案 • 樣板可以是html 或xhtml 檔案 • Xhtml 是比較好的選擇,因為xhtml結構較為嚴謹

  4. aebs:define • 定義樣板語言的變數用,範例 < aebs:define name=“var” value=“varvalue” /> < aebs:define name=“var1” value=“string:hello” />

  5. aebs:if • 依據變數的bool值,來決定是否輸出tag所夾的區段,如: < aebs:if name=“isready” > This is a book. < aebs:if />

  6. aebs:repeat • 處理array物件,重複輸出tag所夾區段 <aebs:repeat name=“item” object=“array0” > <aebs:replace value=“item::address”/> <aebs:replace value=“item::phonenum”/> <aebs:repeat />

  7. aebs:replace • 把此tag換成變數中的內容 < aebs:replace value=“color” /> < aebs:replace value=“string:Brown” />

  8. onerror • 如果發生錯誤會顯示此訊息 < aebs:replace value=“color” onerror=“string:can’t get color value” />

More Related