What is XSLT

XSL(eXtensible Stylesheet Lauguage) is a styling language for XML

is a styling language for XML

XSLT

stands for stands for XSL Transformations.

  • XSL/XSLT are XML based languages.

  • XSL / XSLT allows us to convert one XML structured document into another (data formatting)

  • XSLT is the most common part and it is supported in most web browsers

What is XSL(T)

XSLT is a pattern matching language(rather than a procedural language) that uses templates to generate an output

XSLT Basics

  • XSLT processes nodes of XML document.

    • Uses patten matching to identify the nodes.

    • Performs transformation on those nodes

    • Create a new documents

  • Type of XSLT nodes

    • Document

    • Processing Instruction

    • ELement

    • Attribute

    • Text

    • Namespace

    • Comment

  • XSLT templates

    • Describe the output based on the matched pattern.

    • Templates can be invoked:

Calling templates

  • Can be called by name or by matching nodes against a pattern

  • It's a declaration, so appears as a child node of the stylesheet element.

XSLT Functions

Template construct(What to do)

  • xsl: value - of

    Note: if multiple values are returned, value-of only returns the first node value

  • xsl: for - each

     <xsl:for-each select=“nodePattern”/>
  • xsl: if

     <xsl:if test=“condition”>
  • xsl: choose

     <xsl:choose> 
        <xsl:when test=“condition”>  <xsl:when>
        <xsl:otherwise> </xsl:otherwise>
     </xsl:choose>
  • xsl: apply - templates

XSLT Function

  • ceiling() round decimal up to the nearest integer.

  • floor() round decimal down to the nearest integer.

  • count() determine the quantity in a set.

  • sum() add numbers together

  • 30
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Benaso

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值