XSLT转换 为何多出一空格

zhuhuazha 2008-10-13 04:54:39
原XML:
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>changeDate</ogc:PropertyName>
<ogc:Literal>ab</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
XSL转换段:
<xsl:template match="ogc:PropertyIsGreaterThan">
<xsl:choose>
<xsl:when test="ogc:PropertyName and ogc:Literal">
<RangeQuery fld="{ogc:PropertyName}" lowerTxt="{ogc:Literal}" inclusive="false"/>
</xsl:when>
<xsl:otherwise>
<error type="Unknown content of expression">
<xsl:copy-of select="."/>
</error>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
转换结果:
<RangeQuery inclusive="false" lowerTxt=" ab" fld="changeDate" />
请问:为何转出的结果当中lowerTxt段会多出一空格?
...全文
81 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧