【发布时间】:2014-07-22 04:34:52
【问题描述】:
我的预期 XML 输出(我需要使用 XSLT 转换的 XML。):
<DST>
<DST>
<PQAWD>
<username>TEST</username>
<password>Test</password>
<newPassword />
<hostAddress>@@@@@@@@@@</hostAddress>
<hostPort>@@@@@</hostPort>
</PQAWD>
</DST>
<AWDLogon>
<userID>TEST</userID>
<password encrypt="Y">TRST</password>
<hostAddress>test</hostAddress>
<hostPort>@@@@@</hostPort>
<trace />
<readable>N</readable>
<timeout>120000</timeout>
<newPassword encrypt="Y" />
<config userPrivileges="Y" options="Y" sendRequest="Y" />
<currentJobName>PQAWDLogon</currentJobName>
</AWDLogon>
**<tidx>48006c7898e61461eb110f66a714629864ocx$388111915602261781664778</tidx>**
</DST>
XSL 表(要添加哪个元素以获得以上输出)..
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version = "1.0">
<xsl:template match="//DST/PQAWD">
<AWDLogon>
<userID><xsl:valueof select="username"/></userID>
<password encrypt="Y"><xsl:valueof select="password"/></password>
<hostAddress><xsl:valueof select="hostAddress"/></hostAddress>
<hostPort><xsl:valueof select="hostPort"/></hostPort>
<trace></trace>
<readable>N</readable>
<timeout>120000</timeout>
<newPassword encrypt="Y"><xsl:valueof select="newPassword"/></newPassword>
<config userPrivileges="Y" options="Y" sendRequest="Y" />
<currentJobName>PQAWDLogon</currentJobName>
</AWDLogon>
</xsl:template>
</xsl:stylesheet>
上面是XML,<tidx>标签应该像动态改变的会话ID一样,
是否有任何程序或标签要添加到当前 XSLT 表中以获取上述 XML 作为输出,请帮助我(请考虑上面的 xsl 表作为参考)...
【问题讨论】:
-
您使用的是 XSLT 1.0 还是 2.0?如果是 XSLT 1.0,具体是哪个处理器?
-
很抱歉问你,如何找出我的 xsl 被哪个进程使用?,我是 xml 和 xslt 文件的新手...请帮助我..
-
您将如何运行(执行)转换?
-
我正在使用这个网站进行转换freeformatter.com/xsl-transformer.html#ad-output,但在内部我无法得到它是如何处理的以及是哪个过程,如果我错了请建议我......
-
michael.hor257k,你知道吗?
标签: xml spring xslt spring-integration