我有XML我想要复制的是像(检查的xmlns =“”和标签。我想创建原样。XSLT空白命名空间
总的计算是照顾。只有这个问题。它是有效的。仍然客户希望预期的格式是这样的。任何帮助非常感谢。 三项任务
1)我需要添加命名空间员工xmnls =“1.2”xmlns:xsi =“3”xsi:schemalocation =“4 2)在输出xml中生成像这样的标签不是 3)需要避免xmlns =“”
任何帮助提前gr eatly赞赏 rameshkumar辛格
Input.xml中
<Employees>
<employee>
<dept>1</dept>
<sec></sec>
</employee>
<employee>
<dept>2</dept>
<sec></sec>
</employee>
</Employees>
Expected.XML
<Employees xmnls="1.2" xmlns:xsi="3" xsi:schemalocation="4">
<totalemp>2</totalemp>
<employee>
<dept>1</dept>
<sec></sec>
<employee>
<employee>
<dept>2</dept>
<sec></sec>
<employee>
</Employees>
actual.XML
<Employees>
<totalemp>2</totalemp>
<employee xmlns="">
<dept>1</dept>
<sec/>
</employee>
<employee>
<dept>2</dept>
<sec/>
<employee>
</Employees>
您可以直接生成正确的XML,而不是尝试使用XSLT进行转换吗? (顺便说一句,你的“移位”键似乎被打破,因为句子有随机大小写) –