日期:2014-05-19  浏览次数:20412 次

请问在xsl中如何消除xml中存在的&10;字符, &10;表示换行.

<Root>
        <Line> aaaawww   ccc </Line>
</Root>


其中象 "aaaawww   ccc "这样的文本节点中可能含有&10;   ,   因为是xml文件,   我们在这里看不到换行.   可是若用xsl将那字符串输出到txt文件中就会换行.

在xsl中如何处理能使可能含有&10;的文本节点在输出到文本文件时不会换行.

谢谢.

------解决方案--------------------
好贴,up
------解决方案--------------------
使用特殊字符转换啊
------解决方案--------------------
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp "&#160; ">
]>
------解决方案--------------------
<!ENTITY quot "&#34; "> <!-- quotation mark -->
<!ENTITY amp "&#38;#38; "> <!-- ampersand -->
<!ENTITY apos "&#39; "> <!-- apostrophe -->
<!ENTITY lt "&#38;#60; "> <!-- less than -->
<!ENTITY gt "&#62; "> <!-- greater than -->
<!ENTITY nbsp "&#160; "> <!-- non-breaking space -->
<!ENTITY shy "&#173; "> <!-- soft hyphen (discretionary hyphen) -->
<!ENTITY mdash "&#38;#x2014; ">
<!ENTITY ldquo "&#38;#x201C; ">
<!ENTITY rdquo "&#38;#x201D; ">