[xmlc] Windows file url problem

Yousif Seedham <[email protected]> Wed, 02 Dec 2009 13:14:23 -0600
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1259781426-8018-2626
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hello,

I am using deferred parsing and I am running into a problem with include 
statements in my html document.


html code:
<!--#include file="include/Body_bottom.html" -->

this works fine on linux(tomcat6, jdk1.6)
but on windows(tomcat6, jdk1.6) I get the following exception:

org.enhydra.xml.xmlc.XMLCRuntimeException: 
file:\C:\Tomcat6.0\webapps\test-project\WEB-INF\classes\view\include\Body_bottom.html 
(The filename, directory name, or volume label syntax is incorrect)
    
org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.parseDocument(DocumentLoaderImpl.java:590)
    
org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.checkCacheEntry(DocumentLoaderImpl.java:210)
    
org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(DocumentLoaderImpl.java:238)
    view.LoginHTML.buildDocument(LoginHTML.java:211)
    view.LoginHTML.<init>(LoginHTML.java:194)
    view.LoginHTML.<init>(LoginHTML.java:204)
.
.
.

java.io.FileNotFoundException: 
file:\C:\Tomcat6.0\webapps\test-project\WEB-INF\classes\view\include\Body_bottom.html 
(The filename, directory name, or volume label syntax is incorrect)
    java.io.FileInputStream.open(Native Method)
    java.io.FileInputStream.<init>(Unknown Source)
    java.io.FileInputStream.<init>(Unknown Source)
    org.enhydra.xml.io.InputSourceOps.openSystemId(InputSourceOps.java:76)
    org.enhydra.xml.io.InputSourceOps.open(InputSourceOps.java:94)
    
org.enhydra.xml.xmlc.misc.SSIParsedStream.readIntoBuffer(SSIParsedStream.java:198)
.
.
.


To get it to work on windows I had to define an absolute path:
<!--#include 
file="/c://Tomcat6.0/webapps/test-project/WEB-INF/classes/view/include/Body_bottom.html" 
-->

It seems to me that windows does not like the
"file:" in
"file:\C:\Tomcat6.0\webapps\test-project\WEB-INF\classes\view\include\Body_bottom.html"
which results if i use a relative path in my include.

Any advice would be helpful...


Yousif



------------=_1259781426-8018-2626
Content-Type: text/plain; charset="UTF-8"; name="message-footer.txt"
Content-Disposition: inline; filename="message-footer.txt"
Content-Transfer-Encoding: quoted-printable


--
You receive this message as a subscriber of the [email protected] mailing list=
.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=3Dhelp
OW2 mailing lists service home page: http://www.ow2.org/wws

------------=_1259781426-8018-2626--