0
外部參照標籤我使用這個XML如何解析在XSLT
<body>
<p>The results are used to optimize the design in the next product cycle through the V.</p>
<p> This feedback is represented by arrows between the left and right side of the V<xref ref-type="fig" rid="F1">Figure 1</xref>Physical test benches are often comprised of customized static.</p>
</body>
,並以此作爲XSLT
<xsl:for-each select="body/">
<xsl:value-of select="text()">
</xsl:for-each>
而且它給輸出
結果被用來通過V優化下一個產品週期的設計。該反饋由V的左側和右側之間的箭頭表示。
它不讀取外部參照標記後的字符串。但我想解析它,並希望以下輸出。
的結果用於進行優化設計中通過V.This反饋下一個產品循環由V.物理測試臺的左側和右側之間的箭頭表示通常由定製靜態的。
我應該對Xslt做些什麼改變,以便它也可以傳遞這個標籤?
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" omit-xml-declaration="yes" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
<xsl:template match="book-part">
<html>
<head></head>
<body>
<xsl:for-each select="book-meta">
<p>
<b>
<xsl:value-of select="book-title-group/book-title"/>
</b>
</p>
</xsl:for-each>
<xsl:for-each select="book-part-meta">
<p>
<b>
<xsl:value-of select="title-group/title"/>
</b>
</p>
</xsl:for-each>
<xsl:for-each select="body/sec/p">
<xsl:value-of select="text()"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
這是我的xml。
<?xml version="1.0" encoding="utf-8"?>
<book-part book-part-type="chapter" book-part-number="1" id="PT-161_ch_1">
<book-meta>
<book-title-group>
<book-title>Software-Hardware Integration in Automotive Product Development</book-title>
</book-title-group>
</book-meta>
<body>
<sec id="ch1.1">
<title>INTRODUCTION</title>
<p>The trends of increased functionality, improved performance, reduced size and increased complexity continue to evolve in the automotive electronics market. New system architectures are providing the performance and memory capability necessary to keep up with the hardware performance and software growth required by the automotive market trends. All of this technology growth implies a higher product cost and increased engineering effort required to develop these new products.</p>
<p>IVV is that portion of the complete product or system life-cycle phase captured in the right-hand side (RHS) of the V-diagram model (see <xref ref-type="fig" rid="F96">Fig. 1</xref>). This RHS portion is sometimes called the “build, test, and deliver phase [<xref ref-type="bibr" rid="R65">1</xref>].” The model’s left-hand side is where the architectural design is functionally partitioned and decomposed into manageable subsystems and components. At the lowest levels of decomposition-i.e., the bottom of the “V”-the resulting subsystems are ready to be recomposed into an integrated whole. This integration phase is where verification, validation, and test of all the hardware and software occur.</p>
</sec>
</body>
</book-part>
我沒有得到地方寫。因爲不能是的子項,並且如果我創建另一個模板,那麼它會再次提供舊的結果。它不解析標記。 –
user
沒錯。可以使用我建議的樣式表,也可以通過編輯將整個樣式表添加到帖子中。只有這樣我才能告訴你準確的做法。 –
我已添加我的xslt。現在請解釋我在哪裏編輯,以解析標記。 –
user