我正在学习如何在 XSLT 中执行自定义函数。我发现的每个示例似乎都声明了一个自定义命名空间,例如
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:mynamespace="http://whatever">
我不明白的是我目前拥有“http://whatever”的地方应该放什么,这是做什么的?我不能使用默认的 xsl 命名空间来创建函数吗?
在此先感谢您的帮助
最佳答案
来自 http://www.w3.org/TR/xslt20/#stylesheet-functions
Note:
The prefix must not refer to a reserved namespace: [see ERR XTSE0080]
来自 http://www.w3.org/TR/xslt20/#dt-reserved-namespace
Definition: The XSLT namespace, together with certain other namespaces recognized by an XSLT processor, are classified as reserved namespaces and must be used only as specified in this and related specifications.
来自 http://www.w3.org/TR/xslt20/#err-XTSE0080
It is a static error to use a reserved namespace in the name of a named template, a mode, an attribute set, a key, a decimal-format, a variable or parameter, a stylesheet function, a named output definition, or a character map.
关于xslt - XSLT 中的 namespace ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5873954/