首页 软考

计算机专业时文选读之十

软考 yangjlhnu 浏览 1174

ExtensibleStylesheetLanguage(XSL)(2)ComponentsofXSLXSLisactuallyafamilyofthreetoolsproducedbytheW3C''sXSLWorkingGroup:XPath,XSLTandXSF-FO.*XPath,orXMLPathLanguage,isusedtospecifythepartsofanXMLdocumentthatwillbetransformedbyXSLTransformations(XSLT)

Extensible Stylesheet Language (XSL)(2)

Components of XSL

XSL is actually a family of three tools produced by the W3C's XSL Working Group: XPath, XSLT and XSF-FO.

* XPath, or XML Path Language, is used to specify the parts of an XML document that will be transformed by XSL Transformations (XSLT). XPath interprets an XML document as a hierarchical tree of nodes, which can include elements, attributes or text. The hierarchical tree is called the source-node tree.

* XSLT describes how to filter or convert (transform) XML documents into other types of XML documents, including XSL Formatting Object (XSL-FO) files. An XSLT stylesheet contains a set of template rules for transforming a source tree by matching a pattern against elements in the source tree. When a match is found, the rules are used to create a new node in the result tree. The result tree's structure can be completely different from that of the source tree because elements can be filtered and reordered and arbitrary structure added. An XSLT stylesheet is like a sophisticated search-and-replace routine.

* XSL-FOs are instructions that define exactly how a document will be formatted for a specific medium or device. For a document to be printed, formatting objects can include characters, blocks of text, images, tables, borders, master pages and the like.

XSL-FO specifies various layout rules (e.g., where page breaks can occur) and requirements (e.g., placement of footnotes), but the XSL-FO file itself doesn't determine exactly where each element is positioned. That' s done by a separate formatting engine that interprets the file.

XSL-FO isn't restricted to printed pages and on-screen appearance; it can also specify audio reproduction, for example. Confusingly, XSL-FO is sometimes referred to as XSL.

Why XSL?

XSL is designed for repetitive situations where documents are dynamically generated and formatted on demand, not for documents that require a creative professional to modify the layout, content and typography to get an acceptable (albeit static) result. XSL is thus an ideal fit for documents that have to be output in a variety of formats and on many different types of devices, ranging from printers and computer screens to handhelds and phones.

(The End)

时文选读

可扩展版式语言( XSL)(2)

XSL的组成

实际上, XSL家族有三个工具,分别是由W3C的XSL工作组编制的XPath,、XSLT和XSF-FO。

* XPath,即XML通道语言,用来指定将由XSL转换工具(XSLT)转换的XML文档的部分。XPath用节点的层次树解释XML文档,它可以包括元素、属性或文本。层次树也叫做源节点树。

* XSLT描述如何对XML文档进行过滤或转换成其他类型的XML文档,包括XSL格式化对象(XSL-FO)文件。XSLT版式包含一组转换源树用的模板规则,它是通过将模式与源树中的元素进行匹配来完成转换的。如果匹配,规则就用于生成结果树中的新节点。结果树的结构可以与源树完全不同,因为元素可以被过滤和重新排序,还能加入任意的结构。XSLT版式类似于复杂的搜索和替代子程序。

* XSL-FO是确切定义文档如何为指定的介质或设备而格式化的指令。对于要打印的文档,格式化对象可以包括字符、文本、图像、表格、边框、主页等等。

XSL-FO规定各种不同的排版规则(如何处分页)和要求(如放置脚注),但XSL-FO文件本身不确切决定每个元素的位置。那是由解释该文件的独立的格式化引擎完成。

XSL-FO并不仅仅局限于打印页面和屏幕显示,它还能重现声音。令人混淆的是,XSL-FO有时也指XSL。

为什么用 XSL?

XSL 设计用于重复性的场合,其中文档是动态生成,格式按需产生, XSL 不适合于需要由创作人员修改版式、内容和印刷式样等以保证结果能被接受(虽然是静态的)的文档。因此, XSL 非常适合必须以各种不同的格式和在多种不同设备(从打印机、计算机屏幕到手持设备和电话)上输出的文档。

责任编辑:yangjlhnu|希赛教研中心

希赛教研中心拥有一支规模200余人的专职教研团队,深耕项目管理、软考、通信工程师、金融财会、厂商认证、考博英语等方向,形成“讲师+助教+班主任+智能学习平台”协同联动的完整教学服务体系:讲师讲透方法、助教盯住进度和答疑、班主任守住节奏、智能平台记录每一步成长——环环相扣,让学员的备考全程有人陪、有反馈、有结果。 师资力量雄厚。主要讲师毕业于 985/211 等知名高校,并拥有海外留学归国人才;职称梯队完善,高、中级职称讲师结构合理,讲师持有软考高级资格证书、PMI系列认证、CSPM高级项目管理培训师证、PeopleCert认证、DAMA认证、英语专八(TEM-8)、PETS-5、华为HCIE、经济师、一级建造师等行业权威资质,兼具深厚理论功底与丰富实战经验。 教研成果卓越。教研团队成员深度参与多项国家标准的研制工作,是 GB/T 47282-2026《项目重大节点评审规范》、GB/T 47285-2026《项目商业分析指南》、GB/T 30339-2026《项目和项目群后评价指南》、GB/T 46210-2025《项目成本管理指南》等国家标准的主要起草人,并担任《中国项目管理知识体系指南》总体编写专家组成员。团队累计主编出版专业图书与教材一百多种,覆盖软考、通信工程师、PMP、CSPM、NPDP等多个认证方向。 教学成效显著。 依托希赛自主研发的开放式智能互动学习平台,团队累计服务学员超百万人,帮助众多学员顺利通过软考、 PMP、CSPM、NPDP、华为认证、通信工程师、管理类联考、考博英语等考试,大批学员考入 985、211 等知名高校深造,以专业与口碑赢得学员和行业的广泛认可。

📅 本文最后更新于 2026-04-03

温馨提示:因考试政策、内容不断变化与调整,本网站提供的以上信息仅供参考,如有异议,请考生以权威部门公布的内容为准!
题库
章节练习
章节练习
章节专项突破
模拟考场
模拟考场
海量免费试题
历年真题
历年真题
真题实战演练
每日一练
每日一练
每天10题练习
习题练习
习题练习
核心知识点
机考模拟系统
机考模拟系统
在线模拟考场
高频错题
高频错题
错题突破集训
分享至