摘要
为了实现数据与应用以及实现的分离,可以利用XML技术来创建Web界面组件,其中Schema用来定义组件的结构,脚本用来实现组件的交互功能,最后将脚本代码和实现组件外观的HTML代码放置于XSLT文件中。这样,XSLT文件构成了组件的引擎,XML则是组件引擎的输入数据,用浏览器能看到最终含有组件的页面。通过树形组件这个实例说明其设计的原理、步骤以及关键的代码,能类推到其它的界面组件,有效地提高了系统的可维护性。
To separate the data, application and implement, XML technology is adopted to create interface component on web. Schema is used to define the structure of the component, and script can implement the the interaction of the component, and the script and the HTML code to present the component are put in the XSLT file. Thus, XSLT file is the engine of the component, and XML is the input data of the component engine. The page with component can be viewed by browser. The method, detailed steps and the key codes are showed through an example-treeview component.The whole design can be used in the similar interface component, thus the maintainability of the application is improved efficiently.
出处
《计算机工程与设计》
CSCD
2004年第10期1827-1830,共4页
Computer Engineering and Design