任何試圖通過指向其命名空間使用天線House的XSL-FO擴展(這給出了一個「找不到網頁」 BTW)在一個錯誤的結果:Antenna House XSL-FO擴展無法正常工作?
The element 'root' in namespace 'http://www.w3.org/1999/XSL/Format' has invalid child element 'document-info' in namespace 'http://www.antennahouse.com/names/XSL/Extensions'. List of possible elements expected: 'layout-master-set' in namespace 'http://www.w3.org/1999/XSL/Format'.
看來,有一些類型的命名空間引用問題xsl-fo名稱空間中的元素不能識別擴展元素是否爲有效的子元素?
代碼看起來像這樣:
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:axf='http://www.antennahouse.com/names/XSL/Extensions'>
<xsl:template match='/root'>
<fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format' xmlns:axf='http://www.antennahouse.com/names/XSL/Extensions'>
<axf:document-info name='title' value='value' />
</fo:root>
</xsl:template>
</xsl:stylesheet>
搞笑的是,他們有一個看起來正是這裏同樣在其網站上列出的一個例子:http://www.antennahouse.com/xslfo/axf4-extension.htm#axf.document-info
不幸的是,似乎沒有與V4的工作。 3他們的xsl格式化程序。
爲了記錄,諸如「http:// www.antennahouse.com/names/XSL/Extensions」這樣的名稱空間URI不必解析任何東西。 'XML中的命名空間'Rec(https://www.w3.org/TR/REC-xml-names/#ns-decl)包括「它不是直接可用於檢索模式的目標(if任何存在)「。 (究竟它應該解決什麼問題,如果它確實解決了某個問題,那麼這是一個單獨的討論。) – 2017-04-25 07:47:33