对于下面的 xml 代码,我需要开发一个 xsl-fo 样式表,在 xml 中我混合了文本和行标签,所以我为行创建了 xsl-fo,如下所示,我需要的是我需要生成 xsl- fo 用于类似于 line 的文本
******************************XML************************ ***********************************
<?xml version="1.0" encoding="iso-8859-1"?>
<!--<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">-->
<!-- Generator: Arbortext IsoDraw 7.0 -->
<svg width="100%" height="100%" viewBox="0 0 214.819 278.002">
<g id="Catalog">
<text transform="matrix(0.984 0 0 0.93 183.515 265.271)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174"/>
<text transform="matrix(0.994 0 0 0.93 7.235 265.3)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">087156-8-</text>
<text transform="matrix(0.995 0 0 0.93 21.708 265.357)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174" font-weight="bold">AB</text>
<text x="103.292" y="265.298" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="3.174">P. 1/1</text>
<text transform="matrix(0.994 0 0 0.93 192.812 8.076)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Fittings</text>
<text transform="matrix(0.994 0 0 0.93 188.492 13.323)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Raccords</text>
<text transform="matrix(0.994 0 0 0.93 183.431 18.571)" stroke="none" fill="#000000" font-family="'Helvetica'" font-size="4.586" font-weight="bold">Conexiones</text>
<line stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" x1="58.445" y1="53.612" x2="53.893" y2="50.981"/>
<line stroke-width="0.088" stroke-linecap="butt" x1="53.893" y1="50.981" x2="53.027" y2="50.479"/>
<line stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" x1="61.24" y1="63.011" x2="61.24" y2="60.454"/>
<line stroke-width="0.088" stroke-linecap="butt" x1="61.24" y1="60.454" x2="61.24" y2="59.454"/>
<line stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" x1="131.919" y1="56.159" x2="131.919" y2="55.042"/>
<line stroke-width="0.088" stroke-linecap="butt" x1="131.919" y1="55.042" x2="131.919" y2="54.042"/>
<line stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" x1="126.572" y1="110.132" x2="126.572" y2="106.606"/>
<line stroke-width="0.088" stroke-linecap="butt" x1="126.572" y1="106.606" x2="126.572" y2="105.606"/>
<line stroke-width="0.088" stroke-linecap="butt" stroke-dasharray="2.822 1.058" x1="73.59" y1="127.903" x2="71.022" y2="129.699"/>
</g>
</svg>
************************************XSL-FO *********** ******************************************
我为行创建了 xslfo,如下所示
<xsl:for-each select="svg/g/line">
<xsl:variable name="x1" select="@x1"/>
<xsl:variable name="x2" select="@x2"/>
<xsl:variable name="y1" select="@y1"/>
<xsl:variable name="y2" select="@y2"/>
<svg:g style=" stroke:black;stroke-width:0.088; stroke-linecap:butt;stroke-dasharray:2.822 1.058">
<svg:line x1="{$x1}" y1="{$y1}" x2="{$x2}" y2="{$y2}"/>
</svg:g>
</xsl:for-each>
所以以类似的方式,我该如何为文本执行 xsl-fo 请帮助我