我正在处理XSLT转换。我被困在一个点上。需要有关名称空间的xslt转换帮助
源XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Content xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">
<first xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">Hello World.This is Fisrt field</first>
<second xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">Hello World.This is second field2</second>
</Content>
输出格式要求:
<aaa>Hello World.This is Fisrt field</aaa>
<bbb>Hello World.This is second field</bbb>
请提出一个解决方案。
我已经试过这
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<aaa>
<xsl:value-of select="Content/first"/>
</aaa>
</xsl:template>
</xsl:stylesheet>
输出,我得到的是
<?xml version="1.0" encoding="utf-8"?>
<aaa xmlns="uuid:4522eb85-0a47-45f9-8e2b-1f82c78fa920"></aaa>
要求输出
<aaa>Hello World.This is Fisrt field</aaa>
到目前为止你有什么问题? – Mark 2012-03-08 12:36:03
我试过这个,但没有出来。 <?xml version =“1.0”encoding =“utf-8”?> 的 的 的 XSL:模板> XSL:样式> 输出是 –
2012-03-08 12:40:31
试过什么? - 我看到没有XSLT脚本 – Mark 2012-03-08 12:42:56