问题
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