Re: Compile problems on Linux/Unix

Stefan Armbruster <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Am Mon, 2003-08-25 um 18.31 schrieb Jacob Kjome:
> Do things work without your patch at runtime?  BTW, notice the URL provided 
> for the tutorials.xcat doctype..
Couldn't test this. Without my patch, barracuda refuses to compile.

> 
> <!DOCTYPE XCatalog PUBLIC "-//DTD XCatalog//EN" 
> "file:/org/apache/xerces/readers/xcatalog.dtd">
> 
> Since that obviously works, why wouldn't the other file:/ instances work?
I don't really how this works internally. Take a look at
http://xml.apache.org/xerces-j/apiDocs/org/apache/xerces/readers/XCatalog.html.
There, "org/apache/xerces/readers/xcatalog.dtd" is used without "file:"
or "file:/". XCatalog provides itself a EntityResolver, I think it works
much like the one in EventBuilder.

> 
> In any case, I just tested out your patch and it does indeed work fine on 
> Windows.  Might as well check the changes in, I guess.  I'd still like to 
> know why file:/ works on Windows, but not Unix???  file:/ should be 
> relative to classpath, not an absolute file system path.
> 
Me too ;-) 

Maybe RFC 2396 (http://www.zvon.org/tmRFC/RFC2396/Output/index.html) has
an answer:
<scheme>:/<blabla> is referenced as a absolute path (see section 11)
<schema>:<blabla> is referenced as opaque_part

Combining the two sources, I get a strong feeling that
file:/path1/path2/abc references an absolute path, whereas
file:path1/path2/abc is relative. Everything after the ":" is treated to
be part of the filename, maybe M$ simply ignores a leading "/". So under
Windows the two are identical, Unix make some difference.

Stefan
 

> Jake
> 
> At 04:58 PM 8/25/2003 +0200, you wrote:
> >Hi Jake,
> >
> >thanks for your answer.
> >I tried this at runtime. HelloWorld3 works fine on Linux with my patch.
> >
> >To prove deferred parsing, I modified
> >Barracuda/WEB-INF/classes/org/enhydra/barracuda/tutorials/xmlc/HelloWorld3.xml 
> >after "ant catalina-install". As expected, the changes were visible.
> >
> >Regards,
> >Stefan
> >
> >Am Mon, 2003-08-25 um 16.20 schrieb Jacob Kjome:
> > > Hi Stefan,
> > >
> > > Have you tried running the HelloWorld3 example at runtime?  Deferred
> > > parsing needs to be able to find that file at runtime.  That's actually 
> > why
> > > I made the change in the first place.
> > >
> > > As for Windows, I'm almost 100% positive this won't work.  I'm pretty sure
> > > I tried it without the leading slash.  I think things compile fine, but
> > > deferred parsing couldn't find it at runtime.  The thing is, this is what
> > > XMLC uses in its xcatalog files to find dtd's on the classpath.... and I'm
> > > pretty sure that XMLC's path resolution works on both Windows and
> > > Unix.  Take a look at XMLC default.xcat file to see what I mean.
> > >
> > > Anyway, we'll figure out some resolution to this issue that works for both
> > > Windows and Unix, but I don't think your proposal is the solution.
> > >
> > > Jake
> > >
> > > At 08:35 AM 8/25/2003 +0200, you wrote:
> > > >Hi,
> > > >
> > > >I encountered some compilation problems. The reason for this are some
> > > >changes from 2003/08/15 regarding absolute paths. E.g.
> > > >src/org/enhydra/barracuda/tutorials/xmlc/tutorials.xcat contains a
> > > >reference to file:/xlib/dtds/HelloWorld3.dtd. Note the first "/" here.
> > > >On Unix systems this refers to a absolute local file name
> > > >/xlib/dtds/HelloWorld3.dtd.
> > > >For Unix the correct URL would be file:xlib/dtds/HelloWorld3.dtd, which
> > > >is relative to the current directory (src).
> > > >
> > > >I've attached a diff file containing removal of the first "/" in some
> > > >files in order to compile fine on Linux.
> > > >
> > > >Before applying it to CVS, someone should check if the patch is
> > > >compatible with Micro$oft OSes, since I don't have one, it's up to you.
> > > >
> > > >Since the Unix/Linux bug is part of Barracuda 1.2.5 we should consider
> > > >releasing a 1.2.6.
> > > >
> > > >Regards,
> > > >Stefan
> > > >
> > >
> > > _______________________________________________
> > > Barracuda mailing list
> > > [email protected]
> > > http://barracudamvc.org/lists/listinfo/barracuda
> >
> >_______________________________________________
> >Barracuda mailing list
> >[email protected]
> >http://barracudamvc.org/lists/listinfo/barracuda
> 
> _______________________________________________
> Barracuda mailing list
> [email protected]
> http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.