Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xslt xsl标题是如何定义的_Xslt - Fatal编程技术网

Xslt xsl标题是如何定义的

Xslt xsl标题是如何定义的,xslt,Xslt,xml 鸦片本身的生产自古以来基本没有改变。鸦片贸易在17世纪变得更加规范,当时鸦片与烟草混合在一起用于吸烟,人们首次认识到鸦片成瘾。这是一条测试消息 I need to write XSL for the above xml to get the out like this. 本周,在柏林的IFA上,该公司展示了其音频配件系列的一些更新。榜首是最新公布的inAir 5000,这是一个巨大的桌面AirPlay演讲者,该公司正坚定地定位于与Bowers&Wilkins的

xml

鸦片本身的生产自古以来基本没有改变。鸦片贸易在17世纪变得更加规范,当时鸦片与烟草混合在一起用于吸烟,人们首次认识到鸦片成瘾。这是一条测试消息

             I need to write XSL for the above xml to get the out like this.
本周,在柏林的IFA上,该公司展示了其音频配件系列的一些更新。榜首是最新公布的inAir 5000,这是一个巨大的桌面AirPlay演讲者,该公司正坚定地定位于与Bowers&Wilkins的齐柏林飞艇系列(最近也有自己的AirPlay版本)竞争

像这样的系统,inAir当然提供了一个独特的美学,泪滴设计。考虑到兼容设备可以通过AirPlay无线传输音频,苹果公司选择不在110瓦的系统上安装Apple dock


这就是你要找的吗?它使用递归模板在文本中查找句点。它将文本放置到HTML段落标记的第一个句点,然后递归地调用句点后文本的模板

              <p>This is showing off a handful of updates to its line of audio accessories this week at IFA in Berlin. At top of the list is the newly revealed inAir 5000, a hefty tabletop AirPlay speaker that the company is firmly positioning to take on Bowers&Wilkins' Zeppelin line (which also recently got its own AirPlay version).</p>
              <p>Like that system, the inAir certainly offers a unique take on aesthetics, with a teardrop design. The company opted not to install an Apple dock on the 110 watt system, given that compatible devices can stream audio wirelessly to the thing via AirPlay.</p>

“添加段落”是什么意思?编辑帖子以显示所需的输出。XML这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。这是一条测试消息。我需要为上面的xml编写XSL,以便像这样输出,所以动态地我需要在每个句子之间添加

标记 这是一条测试消息。

这是一条测试消息。

这是一条测试消息。

这是一条测试消息。

这是一条测试消息。

您的XML不再有效,因为其中有&in。你的意思是使用&;巧克力?@_TimC:如果你没有错过句点字符,这个解决方案会很好。我已经尝试了你提供的解决方案,但我没有得到结果“这是一条测试消息

这是一条测试消息

这是一条测试消息

这是一条测试消息

这是一条测试消息

这是一条测试消息

这是一条测试消息

“"迪米特尔·诺瓦切夫啊,是的,我明白了。我已经修改了XSLT,将句点包含在每行的末尾。谢谢你指出这一点!我做了一个更改来处理…,但是您的输入XML不再是有效的XML,因为&Chocolate不是一个可识别的实体。你是说&;巧克力?此外,在回答问题后,请小心更改您的要求。谢谢,抱歉搞混了。我需要处理xml中包含的任何特殊字符。我非常抱歉更改了要求。您能帮我处理xml提要中包含的特殊字符吗。
              <p>This is showing off a handful of updates to its line of audio accessories this week at IFA in Berlin. At top of the list is the newly revealed inAir 5000, a hefty tabletop AirPlay speaker that the company is firmly positioning to take on Bowers&Wilkins' Zeppelin line (which also recently got its own AirPlay version).</p>
              <p>Like that system, the inAir certainly offers a unique take on aesthetics, with a teardrop design. The company opted not to install an Apple dock on the 110 watt system, given that compatible devices can stream audio wirelessly to the thing via AirPlay.</p>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="html"/>
   <xsl:template match="/data">
      <xsl:call-template name="paragraph">
         <xsl:with-param name="text" select="text()"/>
         <xsl:with-param name="separator" select="'...'"/>
         <xsl:with-param name="replace" select="'.'"/>
      </xsl:call-template>
   </xsl:template>
   <xsl:template name="paragraph">
      <xsl:param name="text"/>
      <xsl:param name="separator"/>
      <xsl:param name="replace"/>
      <xsl:choose>
         <xsl:when test="contains($text,$separator)">
            <xsl:variable name="firsttext" select="normalize-space(substring-before($text,$separator))"/>
            <xsl:if test="string-length($firsttext) &gt; 0">
               <p>
                  <xsl:value-of select="$firsttext"/>
                  <xsl:value-of select="$replace"/>
               </p>
            </xsl:if>
            <xsl:call-template name="paragraph">
               <xsl:with-param name="text" select="normalize-space(substring-after($text,$separator))"/>
               <xsl:with-param name="separator" select="$separator"/>
               <xsl:with-param name="replace" select="$replace"/>
            </xsl:call-template>
         </xsl:when>
         <xsl:when test="string-length($text) &gt; 0">
            <xsl:value-of select="normalize-space($text)"/>
            <xsl:value-of select="$replace"/>
         </xsl:when>
      </xsl:choose>
   </xsl:template>
</xsl:stylesheet>
<p>This is showing off a handful of updates to its line of audio accessories this week at IFA in Berlin. At top of the list is the newly revealed inAir 5000, a hefty tabletop AirPlay speaker that the company is firmly positioning to take on Bowers&amp;Wilkins' Zeppelin line (which also recently got its own AirPlay version).</p>
<p>Like that system, the inAir certainly offers a unique take on aesthetics, with a teardrop design. The company opted not to install an Apple dock on the 110 watt system, given that compatible devices can stream audio wirelessly to the thing via AirPlay.</p>
   <xsl:value-of select="$firsttext" />
   <xsl:value-of select="$replace"/>
   <xsl:text>&#13;</xsl:text>
   <xsl:text>&#13;</xsl:text>
This is showing off a handful of updates to its line of audio accessories this week at IFA in Berlin. At top of the list is the newly revealed inAir 5000, a hefty tabletop AirPlay speaker that the company is firmly positioning to take on Bowers&amp;Wilkins' Zeppelin line (which also recently got its own AirPlay version).

Like that system, the inAir certainly offers a unique take on aesthetics, with a teardrop design. The company opted not to install an Apple dock on the 110 watt system, given that compatible devices can stream audio wirelessly to the thing via AirPlay.