XSLT½Ì³Ì

XSL ÓïÑÔ
2007-3-30

XSLT ½éÉÜ
It started with XSL and ended up with XSLT, XPath, and XSL-FO.
XSLº¬ÓÐÈý¸ö×ÓÓïÑÔ£ºXSLT£¬XPathºÍXSL-FO¡£

It Started with XSL
ÒÔXSLΪ¿ªÊ¼

XSL stands for EXtensible Stylesheet Language.
XSL´ú±í×Å¿ÉÀ©³äÑùʽ±íÓïÑÔ£¨EXtensible Stylesheet Language£©¡£

The World Wide Web Consortium (W3C) started to develop XSL because there was a need for an XML-based Stylesheet Language.
ÒòΪ»ùÓÚXMLÑùʽ±íÓïÑÔµÄÐèÒª£¬ÍòÎ¬ÍøÁªÃË£¨W3C£©¿ªÊ¼·¢Õ¹XSL¡£


CSS = HTML Style Sheets
²ãµþʽÑùʽ±í£¨CSS£©= HTMLÑùʽ±í

HTML uses predefined tags and the meaning of the tags are well understood.
HTMLʹÓÃÔ¤¶¨µÄ±êÇ©£¬±êÇ©µÄº¬Òå±È½ÏÈÝÒ×Àí½â¡£

The <table> element in HTML defines a table - and a browser knows how to display it.
ÔÚHTMLÖУ¬<table>ÔªËØ¶¨ÒåÁËÒ»¸ö±í¸ñ£¬ä¯ÀÀÆ÷ÖªµÀÈçºÎÈ¥ÏÔʾËü¡£

Adding styles to HTML elements is simple. Telling a browser to display an element in a special font or color, is easy with CSS.
¸øHTMLÔªËØ¶¨ÒåÑùʽÊDZȽÏÈÝÒ׵ġ£Í¨¹ýʹÓÃCSS£¬¸æËßä¯ÀÀÆ÷¶ÔÌØÊâ×ÖÌåºÍÑÕÉ«µÄÔªËØ½øÐÐÏÔʾ£¬ÊǷdz£ÈÝÒ׵ġ£


XSL = XML Style Sheets
XSL=XMLÑùʽ±í

XML does not use predefined tags (we can use any tag-names we like), and the meaning of these tags are not well understood.
XML²»Ê¹ÓÃÔ¤¶¨µÄ±êÇ©£¨ÎÒÃÇ¿ÉÒÔʹÓÃÈκÎÎÒÃÇ×Ô¼ºÏ²»¶µÄ±êÇ©Ãû×Ö£©£¬ÕâЩ±êÇ©µÄº¬Òå±È½ÏÄÑÒÔÀí½â¡£

The <table> element in HTML defines a table - and a browser knows how to display it.
<table>ÔªËØ¿ÉÒÔ±íʾHTML±í¸ñ£¬Ò»ÖÖÉ豸£¬»òÕß±ðµÄһЩ¶«Î÷£¬Òò´Ëä¯ÀÀÆ÷²»ÖªµÀÈçºÎÈ¥ÏÔʾËüÃÇ¡£

Adding styles to HTML elements is simple. Telling a browser to display an element in a special font or color, is easy with CSS.
XSLÃèÊöµÄÊÇÈçºÎÏÔʾXMLÎĵµ¡£


XSL - More Than a Style Sheet Language
XSL-³¬Ô½Ñùʽ±íÓïÑÔ£¨More Than a Style Sheet Language£©

XSL consists of three parts:
XSLÓÉ3²¿·Ö×é³É£º


This Tutorial is About XSLT

Õë¶ÔXSLTµÄ½Ì³Ì

The rest of this tutorial is about XSLT - the language for transforming XML documents.
Ê£ÏÂÕⲿ·ÖµÄ½Ì³ÌÊǹØÓÚXSLTµÄ——ת»»XMLÎļþµÄÓïÑÔ¡£

But you can also study our XPath Tutorial and our XSL-FO Tutorial.
ͬÑùÄ㻹¿ÉÒÔѧϰ XPath ½Ì³Ì ºÍÎÒÃÇµÄ XSL-FO ½Ì³Ì.

 

XSLT ½éÉÜ