我在下面提到了我的xml文件,xml包含许多内部样式标记(请使用通用的xslt代码来提取所有文本),但它应该提取所有文本在启动innertag之前进行了内部和文本之后。如何从xml中使用xslt提取父标记的父标记文本和扩展文本
<?xml version="1.0" encoding="UTF-8"?>
<Values>
<Value AttributeID="11218">
<Text>WGP03068-CNZH-00
<style name="bold">Introduction of the Title</style>xslt
<style name="TextStyle1">
The smallest font size for which kerning should be automatically adjusted.
</style>
<style name="bold">Reference for this book
<style name="TextStyle1">
The smallest font size for which kerning should be automatically adjusted.
</style>
Hope you had a good learning experience.
</style>
I am expecting more solution for my doughts.
</Text>
</Value>
</Values>
我的XSLT代码如下提到:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<HTML>
<xsl:apply-templates />
</HTML>
</xsl:template>
<xsl:template match="Values">
<xsl:for-each select="Value">
<xsl:for-each select="Text">
<p>
<xsl:for-each select="style">
<xsl:value-of select="." />
</xsl:for-each>
</p>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
我的XSLT缺少启动文本和结束元素的文字它只读取元素,我想全部外线和innertag文本阅读,并添加自己的样式(如粗体,斜体,字体名称和颜色)
我期待输出象下面这样:
WGP03068-CNZH-00 标题介绍 xslt 应该自动调整字距的最小字体大小。 此书的参考资料 字距应该自动调整的最小字体大小,希望你有一个很好的学习经验。 我期待为我的面团提供更多解决方案。
这里我使用ProcessingWordML将XML转换为Word文档 – user2357252 2013-05-07 14:27:45
如果XML具有 20不同的attributeID,如何设置Order格式。我必须检查,如果具有AttributeID =“11111”它应该先显示然后第二应该是AttributeID =“11218”等等..我需要检查attributeID,然后放置位置。请任何人提供解决方案。 –
user2357252
2013-05-16 11:54:59
如果您为此提出了一个全新的问题,而不是在评论中提问,那最好。我相信虽然解决这个问题并不难。 – 2013-05-16 12:26:11