/1105336-00.tif“NDATA ccitt4>
<! - 很多Doctype声明 - >
< em spl =“062W0”模型= “CFM56-3”oidate = “19831231”
TSN </跨度> = “71”docnbr = “CFMI-TP_SM_5”郎=“英语”revdate = “20131215”chg =“你
我建议你运行以下样式表(针对任何格式良好的XML输入),看看你得到了什么:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:variable name="dict" select="document('Dictionary.xml')" /> <xsl:variable name="key" select="'T050000870001'" /> <xsl:template match="/"> <results> <dictionary-exists> <xsl:value-of select="boolean($dict)"/> </dictionary-exists> <entry-exists> <xsl:value-of select="boolean($dict/dictionary/task[@oldkey=$key])"/> </entry-exists> <value> <xsl:value-of select="$dict/dictionary/task[@oldkey=$key]/@seq"/> </value> </results> </xsl:template> </xsl:stylesheet>