I've got a file called Dictionary.xml
<?xml version="1.0" encoding="UTF-8"?>
<DICTIONARY SNAPSHOT_DATE="30.07.2014 17:55:37" SNAPSHOT_CREATOR="XYZ" MODULE="Core" MODULE_VERSION_FROM="ALL" MODULE_VERSION_UNTIL="1.04">
<DICT_ENTRY DICT_ID="58384" VARIANT_ID="13692" STATUS="NEW">
<LANG_ENTRY LANG_ID="EN" STATUS="PROOFED"><![CDATA[Reset target]]></LANG_ENTRY>
</DICT_ENTRY>
... snip...
</DICTIONARY>
and I try to use it in my XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://ift.tt/tCZ8VR" xmlns:fn="http://ift.tt/1hEt2iQ" xmlns:xs="http://ift.tt/1hQy46R" exclude-result-prefixes="xs fn">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:param name="dictionary_file">Dictionary.xml</xsl:param>
<xsl:variable name="dictstrings" select="document($dictionary_file)"/>
... snip...
</xsl:stylesheet>
This generates an error (in Altova XMLSpy Professional Edition v2012 sp1) saying
XTDE71170: Error in XPath 2.0 expression
Error retrieving resource 'Dictionary.xml'
BUT, if I simplify the content of Dictionary.xml, so that it reads
<?xml version="1.0" encoding="UTF-8"?>
<DICTIONARY>
<DICT_ENTRY DICT_ID="58384">
<LANG_ENTRY>Reset target</LANG_ENTRY>
</DICT_ENTRY>
... snip ...
</DICTIONARY>
Then it loads and uses the content of Dictionary.xml.
I assume there is something about the format of the original Dictionary.xml that it doesn't like. Do you know what? Or is there some other problem that I haven't identified here?
No comments:
Post a Comment