0
我有一本書的xml文件,它包含多個章節標籤和多個文章標題標籤。而且我需要用相應的章節標題來獲取每篇文章標籤值的值。xslt:從書中獲取價值xml
我的XML看起來是這樣的:
<root>
<article>
<series-title content-type="section-heading">Reviews</series-title>
</article>
<title>
<article-title>Post-epilepsy stroke: A review</article-title>
</title>
</root>
<root>
<article>
<series-title content-type="section-heading">Original Research</series-title>
</article>
<title>
<article-title>Prognostic implications of the Ankle Brachial Index</article-title>
</title>
</root>
<root>
<article>
<series-title content-type="section-heading">Editorial</series-title>
</article>
<title>
<article-title>What is NODDI and what is its role</article-title>
</title>
</root>
<root>
<article>
<series-title content-type="section-heading">Reviews</series-title>
</article>
<title>
<article-title>An update on the comorbidity of ADHD and ASD</article-title>
</title>
</root>
<root>
<article>
<series-title content-type="section-heading">Editorial</series-title>
</article>
<title>
<article-title>Occipital nerve stimulation and beyond</article-title>
</title>
</root>
而且我的輸出應該是:
<h2>Reviews</h2>
<h3>Post-epilepsy stroke: A review</h3>
<h2>Original Research</h2>
<h3>Prognostic implications of the Ankle Brachial Index</h3>
<h2>Editorial</h2>
<h3>What is NODDI and what is its role</h3>
<h2>Reviews</h2>
<h3>An update on the comorbidity of ADHD and ASD</h3>
<h2>Editorial</h2>
<h3>Occipital nerve stimulation and beyond</h3>
而且事情是,我只用一個模板匹配條件。
任何人都可以幫助: