xsl中有&,<,>这样的特殊字符如何处理

本文探讨了在XSL文件中如何正确处理尖括号等特殊字符的问题,并提供了一个具体的代码示例,涉及XML转换样式表的应用场景。
xsl文件如下:
[code]<?xml version="1.0" encoding="GBK"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
package com.dhms.pro.daoimpl;

import com.dhms.base.daoimpl.BabyDao;
import com.dhms.pro.po.ProTeam;

public class ProTeamDAO extends BabyDao<ProTeam,Long>{

}

</xsl:template>
</xsl:stylesheet>[/code]
其中[color=red]<ProTeam,Long>[/color]出现符号<和>没有办法实现转换
怎么才能在xsl中使用这样的字符?
itemCode过长会超出格子并且好像没换行,&lt;xsl:template match=&quot;TableRow&quot;&gt; &lt;fo:table-row height=&quot;5mm&quot;&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-left-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;no&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-left-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;orgCode&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-left-style&quot; font-size=&quot;2.2mm&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;requestNo&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-left-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;noteType&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-left-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;state&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;empNo&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot; font-size=&quot;2.2mm&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;empName&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot; font-size=&quot;2.2mm&quot;&gt; &lt;fo:block wrap-option=&quot;wrap&quot;&gt;&lt;xsl:value-of select=&quot;itemCode&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot; font-size=&quot;2.2mm&quot;&gt; &lt;fo:block wrap-option=&quot;wrap&quot; language=&quot;zh&quot;&gt;&lt;xsl:value-of select=&quot;itemDesc&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot; font-size=&quot;2.2mm&quot;&gt; &lt;fo:block wrap-option=&quot;wrap&quot; language=&quot;zh&quot;&gt;&lt;xsl:value-of select=&quot;qty&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;fo:table-cell xsl:use-attribute-sets=&quot;border-cell-style&quot;&gt; &lt;fo:block&gt;&lt;xsl:value-of select=&quot;holdQty&quot;/&gt;&lt;/fo:block&gt; &lt;/fo:table-cell&gt; &lt;/fo:table-row&gt; &lt;/xsl:template&gt;
最新发布
08-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值