- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一张 FOP 表格,它运行良好,直到我得到一个很长的词。然后该单词会覆盖以表格结尾的单元格。我在表格单元格和/或单元格块中尝试了 wrap-option="wrap"但它不起作用
**Total Edit**
因为我想在这里只显示位是很复杂的,这是完整的 xsl 文件:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" />
<xsl:param name="tableCell" select="'1.0'" />
<!-- Globale Variablen START -->
<xsl:param name="tabbgcolor" select="'#EEEEEE'" />
<!-- Globale Variablen ENDE -->
<xsl:template match="/datasheet">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions">
<fo:layout-master-set>
<fo:simple-page-master page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="1.5cm" margin-right="1.5cm" master-name="first">
<fo:region-body margin-top="20mm" margin-bottom="20mm" />
<fo:region-before extent="15mm" />
<fo:region-after extent="15mcm" />
</fo:simple-page-master>
<fo:simple-page-master master-name="new" margin-right="1.0cm" margin-left="1.0cm" margin-bottom="1cm" margin-top="1cm" page-height="21cm" page-width="29.7cm">
<fo:region-body margin-top="30mm" margin-bottom="20mm" />
<fo:region-before extent="30mm" />
<fo:region-after extent="15mm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence language="de" country="DE" master-reference="new" initial-page-number="1">
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="center" font-size="12pt" padding="5pt" font-weight="bold">
<xsl:value-of select="title" />
</fo:block>
<fo:block text-align="right" font-size="12pt" padding="5pt" font-weight="bold">
<xsl:value-of select="date" />
</fo:block>
<fo:block text-align="right" font-size="12pt" padding="0pt" font-weight="bold">
<xsl:value-of select="time" />
</fo:block>
<fo:block>
<fo:leader leader-length="100%" leader-pattern="rule" rule-thickness="2pt" color="black" />
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center">
Seite
<fo:page-number />
von
<fo:page-number-citation ref-id="TheVeryLastPage" />
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:leader />
</fo:block>
<fo:block>
<fo:leader />
</fo:block>
<fo:block>
<fo:leader />
</fo:block>
<fo:block font-weight="bold" padding="5pt" padding-top="25pt">
Jahre <xsl:value-of select="fromYear" /> bis <xsl:value-of select="toYear" />
</fo:block>
<fo:block text-align="center">
<xsl:choose>
<xsl:when test="dataList != ''">
<fo:table table-layout="fixed" width="100%" border-style="solide" border-width="1pt">
<fo:table-column column-width="25%" border-style="solid" border-width="1pt" />
<fo:table-column column-width="25%" border-style="solid" border-width="1pt" />
<fo:table-column column-width="25%" border-style="solid" border-width="1pt" />
<fo:table-column column-width="25%" border-style="solid" border-width="1pt" />
<fo:table-header>
<fo:table-row>
<fo:table-cell border-style="solid" font-weight="bold" border-width="0pt">
<fo:block>
Cell1
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" font-weight="bold" border-width="0pt">
<fo:block>
Cell2
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" font-weight="bold" border-width="0pt">
<fo:block>
Cell3
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid" font-weight="bold" border-width="0pt">
<fo:block>
Cell4
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="dataList">
<fo:table-row>
<fo:table-cell padding="5pt" border-style="solid" border-width="1pt">
<fo:block text-align="left">
<xsl:value-of select="data1" />
</fo:block>
</fo:table-cell>
<fo:table-cell padding="5pt" border-style="solid" border-width="1pt">
<fo:block text-align="left">
<xsl:value-of select="data2" />
</fo:block>
</fo:table-cell>
<fo:table-cell padding="5pt" border-style="solid" border-width="1pt">
<fo:block text-align="left">
<xsl:value-of select="data3" />
</fo:block>
</fo:table-cell>
<fo:table-cell padding="5pt" border-style="solid" border-width="1pt">
<fo:block text-align="left">
<xsl:call-template name="intersperse-with-zero-spaces">
<xsl:with-param name="str" select="data4"/>
</xsl:call-template>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:when>
<xsl:otherwise>
<fo:block padding="6cm" text-align="center" font-weight="bold" font-size="16pt">No data.
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:block>
<fo:block id="TheVeryLastPage">
</fo:block>
</fo:flow>
</fo:page-sequence>
<!-- ___________________________________________________________________________________________________________ -->
</fo:root>
</xsl:template>
<xsl:template name="intersperse-with-zero-spaces">
<xsl:param name="str"/>
<xsl:variable name="spacechars">
	

      
     ​
</xsl:variable>
<xsl:if test="string-length($str) > 0">
<xsl:variable name="c1" select="substring($str, 1, 1)"/>
<xsl:variable name="c2" select="substring($str, 2, 1)"/>
<xsl:value-of select="$c1"/>
<xsl:if test="$c2 != '' and
not(contains($spacechars, $c1) or
contains($spacechars, $c2))">
<xsl:text>​</xsl:text>
</xsl:if>
<xsl:call-template name="intersperse-with-zero-spaces">
<xsl:with-param name="str" select="substring($str, 2)"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
<datasheet>
<dataList>
<data1>intro</data1>
<data2>section</data2>
<data3>cutters</data3>
<data4>743576746876357467569384657654687465874638563465873487435767468763574675693846576546874658746385634658734874357674687635746756938465765468746587463856346587348743576746876357467569384657654687465874638563465873487435767468763574675693846576546874658746385634658734874357674687635746756938465765468746587463856346587348743576746876357467569384657654687465874638563465873487435767468763574675693846576546874658746385634658734874357674687635746756938465765468746587463856346587348743576746876357467569384657654687465874638563465873487435767468763574675693846576546874658746385634658734874357674687635746756938465765468746587463856346587348</data4>
</dataList>
</datasheet>
|cell1 |cell2 |cell3 |cell4 |
_________________________________
|intro |section|cutters|7435767|
|4687635|
|7467569|
|3846576|
_________________________________
最佳答案
<xsl:template name="intersperse-with-zero-spaces">
<xsl:param name="str"/>
<xsl:variable name="spacechars">
	

      
     ​
</xsl:variable>
<xsl:if test="string-length($str) > 0">
<xsl:variable name="c1" select="substring($str, 1, 1)"/>
<xsl:variable name="c2" select="substring($str, 2, 1)"/>
<xsl:value-of select="$c1"/>
<xsl:if test="$c2 != '' and
not(contains($spacechars, $c1) or
contains($spacechars, $c2))">
<xsl:text>​</xsl:text>
</xsl:if>
<xsl:call-template name="intersperse-with-zero-spaces">
<xsl:with-param name="str" select="substring($str, 2)"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<fo:block text-align="left">
<xsl:call-template name="intersperse-with-zero-spaces">
<xsl:with-param name="str" select="data4"/>
</xsl:call-template>
</fo:block>
关于xslt - 在 FOP 中用长字包裹在表格单元格中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17317588/
我想了解如何正确地从 Parcel 中读取空值。让我们看看我的用例: public class MyModel implements Parcelable { private Long id;
好吧,我知道我必须使用 JDBC 等,但我不确定如何将 jar 实现到我的代码中,我有一个基本代码来打开文件等,但我如何才能真正将 sqlite jar 与我的 java 一起合并类文件可以在任何地方
我想知道是否可以打包(或序列化)ClassLoader 以通过 Message 将其发送到 Android 中的另一个进程。 ClassLoader没有实现 Parcelable/Serializab
在上传到我的域时尝试让我的 SVG 出现在浏览器中时,我 - 类似于我拥有 的其他项目包裹安装 - 创建了一个 静态文件夹 我会将 SVG 文件放入的位置。它现在出现在浏览器中,但是,正在播放的“绘图
我有这样的东西: 我希望以最简单的方式实现这样的事情:
当我们使用一个独立的函数语句作为 IIFE 时,我们需要用 () 包装它以使其工作 // IFFE (function a(){ console.log('Hello') }()); // I
我正在为 WCF 开发一个 Java 客户端,并且模板运行良好。我最初使用的是 eclipse 的 Web 服务客户端项目,但后来发现 android 平台不支持所需的库。当时我打算使用 ksoap,
我希望将整行变为可点击。现在行看起来像 Group Obj
我有以下标记(使用 Bootstrap 4): .resource{ border:1px solid red; } tes
#parent{ max-width:1100px; margin: auto; border: 1px solid red; padding: 40px; } #ch
我正在尝试用自定义指令包裹 Angular 带的弹出框。 弹出窗口应该能够使用由使用我的指令的人提供的自定义模板,并且该模板应该能够使用 Controller 的范围。 对于范围部分,我发现我可以将
我有一个 HTML 页面,其中一个 div 包含另一个包含数据库(聊天系统)中所有用户的 div,但是 ul li 标签没有占用父 div 的整个宽度。这是预期结果的图像:http://prntscr
我正在尝试通过套接字将包裹发送到 Android 应用程序。客户端在 libbinder(c++) 中,服务器是一个必须重建包裹的 android 应用程序。我一直在寻找解决方案有一段时间了,但我不知
当我部署一个网站(有多个入口点,许多 HTML 文件)并且主机使用构建命令时:parcel build index.html aboutme.html。部署的网站给我一个 404 错误。但是,如果我在
在 Quarkus 中,异常映射器返回的实体似乎被包装在另一个实体中。 提供一个 JAX-RS 异常映射器,例如: @Provider public class WebhookExceptionMap
如果我设置 textLayer.wrapped = YES , 如何调整大小 textLayer包含包装的文本?即,我如何获得 textLayer 的新高度? 基本上,我想要类似 -[UILabel
您好,如果类有 anchor ,我会尝试用 anchor 包裹图像。 jQuery: if ( $(".views-row:has(a)").length) { var noderef = $
所以,我以前多次使用 Parcel,我从来没有遇到过问题。 这一次它抛出了一些关于 SemVer 版本控制的愚蠢错误,我真的很想找到解决这个问题的解决方案。 我开始了新项目:安装了 npm w/npm
我将 Kotlin 与 Anko 一起使用,我想向另一个 Activity 发送玩家列表。 class Player(var name: String?) { var score: Int = 0 i
我正在尝试使用 Parcelable 通过 Activity 传递数据。这是我的代码: public class Player implements Parcelable { public stati
我是一名优秀的程序员,十分优秀!