0
我感興趣的是使用xml和xslt作爲排版工作流程的一部分,通過使用xslt來轉換我的標記系統以匹配乳膠格式。有兩個解決方案,我創建了一個小的XML文檔,其中包含了所有我需要在第一個項目中使用的所有結構元素。來自XSLT轉換的幻像輸出
這個過程仍然是非常初步的,到目前爲止,我一直在確保我可以找到和識別我的XML的元素。然而,我得到了一些讓我難以置信的奇特產物。
我的轉換似乎是返回的信息,只是沒有被要求,連同信息是。奇怪的是,我在之前的測試中成功地請求了無關信息。有誰知道爲什麼我的輸出中包含書目信息?
謝謝!
XML:
<document>
<book>
<booktitle>This is Title of The Book</booktitle>
<chapter>
<chaptertitle>Chapter 1</chaptertitle>
<paragraph>It only has one chapter, and very few words, because it is only a test.</paragraph>
<paragraph>I've made two paragraphs, though. This paragraph has an endnote.<endnote>It is marked by an arabic numeral, and can be found at the end of the document</endnote></paragraph>
<section>
<sectiontitle>Brevity not withstanding...</sectiontitle>
<paragraph>This book has a section, so that I can check the extent of the structure. Here we can find a margin note.<marginnote>They appear next to the body text, in the margin of the page.</marginnote></paragraph>
<paragraph>Here's one last paragraph to test another feature. <verse>Here is some verse.// It is terse.<attribution>The Author</attribution></verse></paragraph>
</section>
</chapter>
</book>
<book>
<booktitle>What If There Was Another Book?</booktitle>
</book>
</document>
XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="chapter">
\chapter{<xsl:value-of select="chaptertitle"/>}
</xsl:template>
</xsl:stylesheet>
輸出:
This is Title of The Book
\chapter{Chapter 1}
What If There Was Another Book?
爲什麼不公開可用的東西就已經這是否... https://sourceforge.net/projects/db2latex/ –