【发布时间】:2012-09-07 11:08:49
【问题描述】:
我的 xsl 转换出了点问题,我看不到问题(是的,新手)。
我有一个 xml:
<REG_REQUEST>
<header>
<version/>
<!-- many tags here -->
<ref_dtls>
<ref_doc_num>000111222</ref_doc_num>
<ref_doc_date>01.01.2000</ref_doc_date>
<ref_name>Hello world!</ref_name>
</ref_dtls>
</header>
<general_info>
<dfiState>AGRM</dfiState>
</general_info>
<add_info>some additional info here</add_info>
<!-- many more tags here -->
</REG_REQUEST>
还有一个 xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="header">
<!-- template contents -->
</xsl:template>
</xsl:stylesheet>
模板本身打印良好,但之后它还会打印所有 xml 属性值的列表。该模板仅包含一些 html 代码输出。我不知道为什么会这样。
【问题讨论】:
标签: xml xslt transformation