开发工具:
文件大小: 2mb
下载次数: 0
上传时间: 2011-06-03
详细说明: 从官网下载来的,应该是最权威的教程了. 目录 FreeMarker 手册 .......................................................................................................... 1 用于 FreeMarker 2.3.18 ........................................................................................... 1 目录................................................................................................................................ 2 前言................................................................................................................................ 7 什么是Free Marker? ................................................................................................. 7 我们应该阅读什么内容? .......................................................................................... 7 文档规约................................................................................................................... 8 联系我们................................................................................................................... 8 几点说明................................................................................................................... 8 第一部分 模板开发指南 ................................................................................................... 9 第一章 模板开发入门 ............................................................................................... 9 1.1 简介 ............................................................................................................ 9 1.2 模板 + 数据模型 = 输出 ............................................................................. 9 1.3 数据模型一览 ............................................................................................ 10 1.4 模板一览 ................................................................................................... 13 第二章 数值和类型 ................................................................................................. 19 2.1 基本内容 ................................................................................................... 19 2.2 类型 .......................................................................................................... 21 第三章 模板 ........................................................................................................... 25 3.1 总体结构 ................................................................................................... 25 3.2 指令 .......................................................................................................... 26 3.3 表达式 ....................................................................................................... 27 3.4 插值 .......................................................................................................... 42 第四章 其它 ........................................................................................................... 45 4.1 自定义指令 ................................................................................................ 45 4.2 在模板中定义变量 ..................................................................................... 50 4.3 命名空间 ................................................................................................... 53 4.4 空白处理 ................................................................................................... 56 4.5 替换(方括号)语法 ................................................................................... 59 第二部分 程序开发指南 ................................................................................................. 61 第一章 程序开发入门 ............................................................................................. 61 1.1 创建配置实例 ............................................................................................ 61 1.2 创建数据模型 ............................................................................................ 61 1.3 获得模板 ................................................................................................... 62 1.4 合并模板和数据模型 .................................................................................. 63 1.5 将代码放在一起 .......................................................................................... 63 第二章 数据模型 .................................................................................................... 65 2.1 基本内容 ................................................................................................... 65 2.2 标量 .......................................................................................................... 65 2.3 容器 .......................................................................................................... 66 2.4 方法 .......................................................................................................... 67 2.5 指令 .......................................................................................................... 68 2.6 节点变量 ................................................................................................... 74 2.7 对象包装 ................................................................................................... 75 第三章 配置 ........................................................................................................... 79 3.1 基本内容 ................................................................................................... 79 3.2 共享变量 ................................................................................................... 79 3.3 配置信息 ................................................................................................... 80 3.4 模板加载 ................................................................................................... 82 3.5 错误控制 ................................................................................................... 85 第四章 其它 ........................................................................................................... 89 4.1 变量 .......................................................................................................... 89 4.2 字符集问题 ................................................................................................ 89 4.3 多线程 ....................................................................................................... 91 4.4 Bean 的包装 ................................................................................................ 91 4.5 日志 .......................................................................................................... 97 4.6 在Servlet 中使用FreeMarker ...................................................................... 98 4.7 为FreeMarker 配置安全策略......................................................................105 4.8 遗留的XML 包装实现 ................................................................................106 4.9 和Ant 一起使用FreeMarker.......................................................................109 4.10 Jython 包装器 ..........................................................................................110 第三部分 XML 处理指南................................................................................................112 前言.......................................................................................................................112 第一章 揭示XML 文档 ...........................................................................................113 1.1 节点树 ......................................................................................................113 1.2 将XML 放到数据模型中 ............................................................................115 第二章 必要的XML 处理 ........................................................................................117 2.1 通过例子来学习 ........................................................................................117 2.2 形式化描述 ...............................................................................................124 第三章 声明的XML 处理 ........................................................................................129 3.1 基础内容 ..................................................................................................129 3.2 详细内容 ..................................................................................................131 第四部分 参考文档 .......................................................................................................134 第一章 内建函数参考文档 .....................................................................................134 1.1 处理字符串的内建函数 .............................................................................134 1.2 处理数字的内建函数 .................................................................................147 1.3 处理日期的内建函数 .................................................................................151 1.4 处理布尔值的内建函数 .............................................................................155 1.5 处理序列的内建函数 .................................................................................156 1.6 处理哈希表的内建函数 .............................................................................161 1.7 处理节点(XML)的内建函数....................................................................162 1.8 很少使用的和专家级的内建函数 ...............................................................163 第二章 指令参考文档 ............................................................................................167 2.1 if,else,elseif 指令 ...................................................................................167 2.2 switch,case,default,break 指令..............................................................169 2.3 list,break 指令 .........................................................................................170 2.4 include 指令 ...............................................................................................171 2.5 import 指令 ...............................................................................................174 2.6 noparse 指令 ..............................................................................................175 2.7 compress 指令 ............................................................................................176 2.8 escape,noescape 指令...............................................................................177 2.9 assign 指令 ................................................................................................179 2.10 global 指令 ..............................................................................................181 2.11 local 指令 ................................................................................................182 2.12 setting 指令 .............................................................................................182 2.13 用户自定义指令(<@...>) ......................................................................184 2.14 macro,nested,return 指令 ....................................................................186 2.15 function,return 指令...............................................................................190 2.16 flush 指令 ................................................................................................192 2.17 stop 指令.................................................................................................192 2.18 ftl 指令 ....................................................................................................193 2.19 t,lt,rt 指令 ..........................................................................................194 2.20 nt 指令 ....................................................................................................195 2.21 attempt,recover 指令 .............................................................................196 2.22 visit,recurse,fallback 指令 .....................................................................197 第三章 特殊变量参考文档 .....................................................................................202 第四章 FTL 中的保留名称.......................................................................................204 第五章 废弃的FTL 结构 .........................................................................................205 5.1 废弃的指令列表 ........................................................................................205 5.2 废弃的内建函数列表 .................................................................................205 5.3 老式的macro 和call 指令 ..........................................................................205 5.4 转换指令 ..................................................................................................207 5.5 老式FTL 语法 ............................................................................................208 5.6 #{…}式的数字插值 ......................................................................................209 第五部分 附录 ..............................................................................................................211 附录A FAQ .............................................................................................................211 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.