How can I access current xml document uri in XSLT?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This cannot be done in pure XSLT 1.0 without writing your own extension function.
In XSLT 2.0 (or XPath 2.0) one can use the standard XPath 2.0 function document-uri()
回答2:
Short answer: No :)
You can't. The namespace URI is conceptually part of the element name and you can't use xsl:copy if you want to change the name.