Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2003-03-12
Medium Priority
Last Modified: 2007-12-19
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.
<?xml version="1.0" encoding="ISO8859-1"?>
  <Name>book mark</Name>
<?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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="left-space-format">
<xsl:param name="string1"/>

Question by:bigmouth1979
1 Comment
LVL 27

Accepted Solution

BigRat earned 1000 total points
ID: 8126968
Quite clearly it cannot open the include file. I personally don't like the URL file:///home/common.xsl

Although I presume that /home/common.xsl exists and is in good spirits, I suspect that the URL resolver is trying to handle the implied "localhost" part, possibly connecting to the local filestore remotely????? (I've done this on Windows, not however with Xalan, but with //computername/c/dir/file.txt - it didn't optimize the /// part out!)

If there is nothing against it, I'd make the reference in the XSL explicit :- file:/home/common.xsl


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question