Change document attributes of an XML using XSLT

筅森魡賤 提交于 2019-12-11 06:14:58

问题


I have an XSLT which changes the attributes of an XML.

<xsl:template namne="apply-document-attributes">
  <xsl:attribute name="xmlns">urn:iso:std:iso</xsl:attribute>
  <xsl:attribute name="xmlns:xsi" namespace="http://www.w3.org" />
</xsl:template>

My problem here is that I need to only have two attributes: xmlns and xmlns:xsi.

The code above is creating another variable xp_0:xsi="" and xmlns is not accepted by .Net.

Below is my preferred output

<Document xmlns="urn:iso:std:iso" xmlns:xsi="http://www.w3.org">

Any advise for this..

来源:https://stackoverflow.com/questions/18179184/change-document-attributes-of-an-xml-using-xslt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!