xsl

本文介绍XSLT中的输出控制方法,包括如何通过<xsl:output>元素定义输出格式,以及使用<xsl:element>和<xsl:attribute>元素动态创建XML结构。此外还探讨了XLink和XPointer在XML文档中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

xslt可以输出xml,html或者普通文本格式。<xsl:output>元素定义了输出的method以及输出方式的控制。如果<xsl:output>包含在样式表中,它必须是<xsl:stylesheet>元素的一级子节点。在xslt文件中,所有<xsl:stylesheet>元素的一级子节点被称为top-level元素。<xsl:output>元素语法如下:<xsl:output method="xml or html or text"
version="version"
encoding="encoding"
omit-xml-declaration="yes or no"
standalone="yes or no"
cdata-section-elements="CDATA sections"
indent="yes or no"/>
如果在xsl文件中没有包含<xsl:output>元素,并且目标文件的根元素为<html>,那么默认的输出method为html,否则默认的输出方式为xml.

<xsl:element>标签可以使我们动态的创建元素,语法如下:
<xsl:element name="element name"
use-attribute-sets="attribute set names"
namespace="namespace URI">

<xsl:attribute>可以被用来动态的添加元素的属性。用法:xsl:attribute name="attribute name"
namespace="namespace URI">
<xsl:text>标签正如其名,可以插入PCDATA文本到目标文件,用法:<xsl:text disable-output-escaping="yes or no">

<extension>标签可以对<schema>定义的基础类型进行扩展,<restriction>标签可以对<schema>定义的基础类型进行约束。

It is often necessary to design distributed systems where the code to run an application is spread across multiple computers.In order to make an rpc, you need to know a number of things:@where does the code you want to call reside?@does the code any parameters? @ will the procedure return any data? A protocol is a set of rules that allow different applications or even different computers to communicate. These protocola specify how to provide an address for the remote computer,how to package up data to be sent to the remote procedures and how to get any return data back,how to initiate the call,how to deal with errors and all of the other details that need to be addressed to allow multiple computers to communicate with each other. SOAP just solves part od the distributed computing problem:it allows you to make remote procedure calls,however, in order to make use of a procedure which is avaible through soap, you have to know where that procedure is located as well as exactly how to pass the information to that procedure-how to format the body of the soap message. you may also need other information about the procedure. The web service description language is an xml-based lanuage that provides a contract between a web service and the outside world. XLINK provides a mechanism for defining links,including links which involve multiple resources and multiple traversal direction between those resources. XPointer provides functionality for pointing to document fragments from xml documents.

XLink provides a number of global attributes which can be attached to any xml element to define a link. The attributes are as follows:@type specifies the type of xlink element being created @href specifies the uri used to retrieve a resource@role is used to specify the function of a link's resource in machines readable fashion@title is used to specify the function of a link' resource in a human-readable fashion@show specifies how the resource should be displayed when retrieved@actuate specifies when the specified resource should be retrieved@the from and to attributes specify link directions. Which attributes can used on an element depends on the value of type which is mandatory on any xml element being used to define a link.There are six types:#simple;#extended;#locator;@arc;@resource;@title.

XLink defines two main types of links: a simple link and an extended link. A simple link is what we have been working with all along in html. It deals with only two resources and is unidirectional. Extended links provide extra functionality that html links do not.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值