一直对extension-element-prefixed这个属性的作用不清楚,也忽视了它,今天看到自己的xslt转换出来的文件,多了一个名称空间。
看XSLT2.0 programmer's reference时,又看到这样一句话:
Every addtional namespace you add will also appear in the result document.usually you don't want this ,so tell the xsl that this is only an extension element prefix.
你添加的每个扩展名称空间都会出现在转换后的文档中,大多数情况下,你可能不需要它,为此,你可以告诉xsl,它只是一个扩展的元素前缀而已。
例如:
<xsl:stylesheet xmlns:xsl=" [url]http://www.w3.org/1999/XSL/Transform[/url]" xmlns:xs=" [url]http://www.w3.org/2001/XMLSchema[/url]" extension-element-prefixes="xs">