Link to home
Start Free TrialLog in
Avatar of bigmouth1979
bigmouth1979

asked on

Cannot solve the following Exception:The primary document entity could not be opened.

When parsing a xml file with xsl file which includes a common.xsl using C++ xalan, such error occurs occationally(not always) :
An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened. Id=file:///home/common.xsl

How can i fixed so that i can prevent such error again ??
Thanks a lot.

THe following is the format of the xml and the xsls.
(1234.xml)
<?xml version="1.0" encoding="ISO8859-1"?>
<Book>
   .......
  <Name>book mark</Name>
  .......
</Book>
(1234.xsl)
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" encoding="ISO8859-1"/>
<xsl:include href="common.xsl"/>
  <xsl:template match="/">
     .......
     <xsl:variable name="Name" select="Book/Name"/>    
     <xsl:call-template name="left-space-format">
         <xsl:with-param name="string1" select="$Name"/>
     </xsl:call-template>
     .......
  </xsl:template>
</xsl:stylesheet>
(Common.xsl)
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
........
<xsl:template name="left-space-format">
<xsl:param name="string1"/>
..........
</xsl:template>
...........
</xsl:stylesheet>

ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial