我在下面提到了我的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