- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
XSLT 转换
Example study: How to transform XML into XHTML using XSLT.实例学习:如何通过XSLT把XML转换成XHTML。
The details of this example will be explained in the next chapter.此实例的详细情况将在下一章中作详细说明。
Correct Style Sheet Declaration正确的样式表声明
The root element that declares the document to be an XSL style sheet is xsl:stylesheet or xsl:transform.将文件以XSL样式表进行声明的根元素(root element)是xsl:stylesheet 或xsl:transform。
Note: xsl:stylesheet and xsl:transform are completely synonymous and either can be used!注意: xsl:stylesheet 和xsl:transform是完全同义的,任何一个都能被使用。
The correct way to declare an XSL style sheet according to the W3C XSLT Recommendation is:声明根据W3C XSLT参考标准的XSL样式表的正确的途径是:
xsl:stylesheet version=1.0xmlns:xsl=/1999/XSL/Transform or:或:
xsl:transform version=1.0xmlns:xsl=/1999/XSL/Transform To get access to the XSLT elements, attributes and features we must declare the XSLT namespace at the top of the document.想要有权使用XSLT元素,我们必须在文件的顶端事先声明XSLT命名空间的属性和特征。
The xmlns:xsl=/1999/XSL/Transform points to the official W3C XSLT namespace. If you use this namespace, you must also include the attribute version=1.0.xmlns:xsl=/1999/XSL/Transform指出了官方W3C XSLT的命名空间(namespace)。如果你使用了这个命名空间,你也必须注明属性版本(version)=1.0。
?
Start with a Raw XML Document以XML源文件开始
We want to transform the following XML document (cdcatalog.xml) into XHTML:让我们把下面的XML文件(cdcatalog.xml)转换成XHTML吧。
?xml version=1.0 encoding=ISO-8859-1?catalog cd titleEmpire Burlesque/title artistBob Dylan/artist countryUSA/country companyColumbia/company price10.90/price year1985/year /cd.../catalog Viewing XML Files in Firefox and Internet Explorer: Open the XML file (typically by clicking on a link) - The XML document will be displayed with color-coded root and child elements. A plus (+) or minus sign (-) to the left of the elements can be clicked to expand or collapse the element structure. To view the raw XML source (without the + and - signs), select View Page Source or View Source from the browser menu.在火狐
您可能关注的文档
- Win安装激活说明【DOC精选】.doc
- Win下Virtual PC,VMware和VirtualBox 三款虚拟机软件使用比较【DOC精选】.doc
- Windows网络服务搭建管理之WEB FTP(服务器群集 负载平衡)CA证书服务器的搭建和配置【DOC精选】.doc
- win如何安装IPX协议【DOC精选】.docx
- win家庭版升级旗舰版过程详解【DOC精选】.doc
- WIN汇编-【DOC精选】.doc
- with+O+OC【DOC精选】.doc
- Win网卡驱动安装方法【DOC精选】.doc
- windows编程技术GDI+编程基础【DOC精选】.doc
- Word Bank of CET 【DOC精选】.doc
- XSLT - 位于客户端【DOC精选】.doc
- XQuery函数快速指南【DOC精选】.doc
- XP-,,,说明书【DOC精选】.doc
- XRD分析软件Xpert HighScore Plus 安装和导入pdf卡片图文教程【DOC精选】.doc
- XT9规约【DOC精选】.doc
- xmpp协议的使用【DOC精选】.doc
- XtraGrid - Band and Column Customization运行时修改caption内容【DOC精选】.doc
- xc考试B类真题【DOC精选】.doc
- XXXX级会计学专业《计算机会计》试卷【DOC精选】.doc
- XXXX大学毕业设计格式样本【DOC精选】.doc
文档评论(0)