How to avoid all namespace occurrence in output by writing a single statement in XSLT

前端 未结 4 1223
忘了有多久
忘了有多久 2021-02-20 04:09

I wrote \"exclude-result-prefixes\" and even then I see the name space occurrence appearance in output.



        
4条回答
  •  你的背包
    2021-02-20 04:41

    The exclude-result-prefixes attribute will (in some situations) remove unused namespace declarations from the output. It will never remove namespaces that are actually in use for element and attributes in the result: that is, it will never change the names of the elements and attributes to put them in a different namespace (or in no namespace). If you want elements not to be in a namespace, you must avoid putting them in a namespace when you generate them, whether by using literal result elements, xsl:element, or xsl:copy.

提交回复
热议问题