w3pop.com :: ÍøÂçѧԺ :: XML :: Óà XSL ÏÔʾ XML
With XSL you can add display information to your XML document.
ÓÃXSLÄã¿ÉÒÔΪXMLÎĵµÌí¼Ó¶ÔÓ¦µÄÏÔʾÐÅÏ¢¡£
XSL is the preferred style sheet language of XML.
XSLÊÇXML×îºÃµÄÑùʽ±íÓïÑÔ¡£
XSL (the eXtensible Stylesheet Language) is far more sophisticated than CSS. One way to use XSL is to transform XML into HTML before it is displayed by the browser as demonstrated in these examples:
XSL£¨¿ÉÀ©Õ¹Ñùʽ±íÓïÑÔ£©Ô¶±ÈCSS³ÉÊ죬ʹÓÃXSLµÄÒ»ÖÖ·½Ê½ÊÇ£ºÔÚXML±»ä¯ÀÀÆ÷ÏÔʾ֮ǰ£¬ÊÂÏȽ«Æäת»»³ÉHTML¸ñʽ¡£ÏÂÃæµÄ°¸ÀýºÜºÃµØ²ûÊÍÁËÕâµã:
²é¿´XMLÎļþ, XSLÑùʽ±íºÍ½á¹û¡£
Below is a fraction of the XML file. The second line, <?xml-stylesheet type="text/xsl" href="simple.xsl"?>, links the XML file to the XSL file:
ÏÂÃæÁоٵÄÊÇÕâ·ÝXMLÎļþÖÐµÄÆäÖÐÒ»¸ö´úÂë¶Î¡£µÚ¶þÐÐÓï¾ä£º<?xml-stylesheet type="text/xsl" href="simple.xsl"?> £¬ÒâÖ¸°ÑXMLÎļþÁ´½Óµ½xslÎļþÖУº
<?xml version="1.0" encoding="ISO-8859-1"?> |
If you want to learn more about XSL, please visit our XSL tutorial.
Èç¹ûÄãÏëÁ˽â¸ü¶à¹ØÓÚXSLµÄ֪ʶ£¬Çë²éÔÄÎÒÃÇµÄ XSL ½Ì³Ì ¡£