Xslt 段落需要有2行或3行句子,而不仅仅是一行

Xslt 段落需要有2行或3行句子,而不仅仅是一行,xslt,Xslt,可能重复: 这是XML: <data>The production of opium itself has basically not changed since ancient times...Opium trade became more regular by the seventeenth century, when it was mixed with tobacco for smoking, and addiction was first recognized... Thi

可能重复:

这是XML:

<data>The production of opium itself has basically not changed since
ancient times...Opium trade became more regular by the seventeenth
century, when it was mixed with tobacco for smoking, and addiction was
first recognized... This is a test Message3…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)... 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...Twice a month, tourists board a bus and embark on a "fact-finding mission" to one of the hottest spots in the immigration debate -- the Arizona-Mexico border. Tourists are encouraged to make make up their own minds..."Contagion" is an action-thriller about the pandemic outbreak of a deadly virus. It is part fantasy, part reality and totally possible, says one global health expert...The families are trying to raise the bail money.</data>
鸦片本身的生产自那时以来基本上没有改变
古代……鸦片贸易在十七世纪变得更加规范
20世纪,当它与烟草混合用于吸烟时,上瘾是不可避免的
第一次认识到。。。这是一条测试信息3…这是在炫耀
本周在IFA上对其音频配件系列进行了少量更新
在柏林。榜首是最新公布的inAir 5000,这是一款
该公司正在坚定定位的重型桌面AirPlay扬声器
与鲍尔斯和威尔金斯公司的齐柏林飞艇系列接轨(该系列最近也获得了
自己的AirPlay版本)。。。像这样的系统,inAir当然提供了
独特的美学设计,泪滴设计。公司选择了
考虑到这一点,不要在110瓦的系统上安装Apple dock
兼容设备可以通过无线方式将音频流传输到设备
飞机表演……每个月两次,游客登上巴士,开始“实况调查任务”,前往移民辩论中最热门的地点之一——亚利桑那州-墨西哥边境。“传染病”是一部关于致命病毒大流行爆发的动作惊悚片。一位全球健康专家说,这部分是幻想,部分是现实,完全可能……这些家庭正试图筹集保释金。
使用xsl 段落需要分成三条相等的线,但不仅仅是一条,另一件事是我需要删除“…”,“…”,并用句号替换它

<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.Twice a month, tourists board a bus and embark on a "fact-finding mission" to one of the hottest spots in the immigration debate -- the Arizona-Mexico border. Tourists are encouraged to make make up their own minds.</p>
本周,在柏林的IFA上,该公司展示了其音频配件系列的一些更新。榜首是最新公布的inAir 5000,这是一个巨大的桌面AirPlay演讲者,该公司正坚定地定位于与Bowers&Wilkins的齐柏林飞艇系列(最近也有自己的AirPlay版本)竞争

像这样的系统,inAir当然提供了一个独特的美学,泪滴设计。该公司选择不在110瓦的系统上安装苹果基座,因为兼容设备可以通过AirPlay无线传输音频。游客每月两次登上巴士,前往移民辩论中最热门的地点之一——亚利桑那-墨西哥边境进行“实况调查任务”。鼓励游客自己下定决心

《传染病》是一部关于致命病毒大流行爆发的动作惊悚片。一位全球健康专家说,这是部分幻想、部分现实和完全可能的。这些家庭正试图筹集保释金。

我希望这个答案是你需要的:
I hope this answer is what you need:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" indent="yes" />
  <xsl:template match="/">
    <xsl:variable name="count" select="string-length(.)"/>
    <xsl:variable name="firstparagraph" select="substring(., 1, string-length(.)-($count*0.67))"/>
    <xsl:variable name="afterfirstparagraph" select="substring-after(., $firstparagraph)"/>
    <xsl:variable name="countafterfirstparagraph" select="string-length($afterfirstparagraph)"/>
    <xsl:variable name="secondparagraph" select="substring($afterfirstparagraph, 1, string-length($afterfirstparagraph)-($countafterfirstparagraph*0.5))"/>
    <xsl:element name="data">
      <xsl:element name="p">
    <xsl:value-of select="replace(replace(substring(., 1, string-length(.)-($count*0.67)), '\.\.\.', '.'), '…', '.')"/>
      </xsl:element>
      <xsl:element name="p">
        <xsl:value-of select="replace(replace(substring($afterfirstparagraph, 1, string-length($afterfirstparagraph)-($countafterfirstparagraph*0.5)), '\.\.\.', '.'), '…', '.')"/>
      </xsl:element>
      <xsl:element name="p">
        <xsl:value-of select="replace(replace(substring-after(., $secondparagraph), '\.\.\.', '.'), '…', '.')"/>
      </xsl:element>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

请注意,您必须用unicode替换“&”。

请帮助我。提前感谢您在您想要的结果中只有两个
p
标记。在我的live xml提要中,我将有两个以上的p标记,这是一个表达我问题的示例。每个p标记中应该包含3个句子。但是在您的示例输出中,第一段包含2个句子,第二段包含4个句子?????