带输入参数的XSLT [英] XSLT with input parameter

查看:54
本文介绍了带输入参数的XSLT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


是否可以为转换提供输入参数?

我想在转换中将此参数用作变量。


谢谢。


bye bembi

Hello everyone,

is it possible to give a transformation a input parameter?
I want to use this parameter as a variable in my transformation.

thanks.

bye bembi

推荐答案

< a href =mailto:bb ******* @ lycos.de> bb ******* @ lycos.de 写道:
bb*******@lycos.de wrote:

是否可以为转换提供输入参数?

我想在转换中将此参数用作变量。
is it possible to give a transformation a input parameter?
I want to use this parameter as a variable in my transformation.



是的,您可以使用参数的

名称定义顶级xsl:param元素然后使用您的XSLT处理器的API要在运行转换之前设置该参数。


< xsl:stylesheet

xmlns: xsl =" http://www.w3.org/1999/XSL/Transform"

version =" 1.0">


< ; xsl:param name =" p1" />


< xsl:template match =" /">

< xsl :value-of select ="

Yes, that is possible, you define a top-level xsl:param element with the
name of the parameter and then you use the API of your XSLT processor to
set that parameter before running the transformation.

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:param name="p1"/>

<xsl:template match="/">
<xsl:value-of select="


p1" />

< / xsl:template>

< / xsl:stylesheet>


-


Martin Honnen
http://JavaScript.FAQTs.com/
p1"/>
</xsl:template>
</xsl:stylesheet>

--

Martin Honnen
http://JavaScript.FAQTs.com/


非常感谢。


bembi

16 Mai,17:04,Martin Honnen< mahotr ... @ yahoo.dewrote:
Thank you very much.

bembi
On 16 Mai, 17:04, Martin Honnen <mahotr...@yahoo.dewrote:

bbembi ... @ lycos.de写道:
bbembi...@lycos.de wrote:

是否可以为转换提供输入参数?

我想在转换过程中将此参数用作变量。
is it possible to give a transformation a input parameter?
I want to use this parameter as a variable in my transformation.



是的,您可以使用参数的

名称定义顶级xsl:param元素,然后使用您的XSLT处理器的API要在运行转换之前设置该参数。


< xsl:stylesheet

xmlns: xsl =" http://www.w3.org/1999/XSL/Transform"

version =" 1.0">


< ; xsl:param name =" p1" />


< xsl:template match =" /">

< xsl :value-of select ="


Yes, that is possible, you define a top-level xsl:param element with the
name of the parameter and then you use the API of your XSLT processor to
set that parameter before running the transformation.

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:param name="p1"/>

<xsl:template match="/">
<xsl:value-of select="


这篇关于带输入参数的XSLT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆