Xml – In Eclipse 3.5 : Rewrite xsl import/include location behind the scenes so it will properly validate files


I'm using Ubuntu

I'm working with xsl files that have import or include statements like this

<xsl:import href="/xsl/content/contentsecondary.xsl"/>

Eclipse can't find this file because the /xsl/ isn't actually at the the root of the project, but is seen from the root of the web server because of this line in my etc/xml/catalog file:

<rewriteSystem systemIdStartString="/xsl/" 

So in order for eclipse's built in xsl validation to work, it needs to know the real location of /xsl/. Does anyone have any idea how to do this?

For now I've turned off error reporting on missing include files but still get errors on call-template calls to templates it can't find. I've never experienced our templates fully integrated with eclipses xsl features. I think it would provide some really great error checking/auto-completion that I'm missing out on.

Any help would be appreciated. Thanks.

Best Solution

Is there any reason you can't replicate the structure under the deployment directory in your project dir? If you don't want to migrate the existing structure, you could replicate the rewrite in your project using symbolic links.

If you are worried not just about the content completion/validation, and want to run it, you could write a simple java client that provides it's own URIResolver to resolve URLS to that you obtain correct references.

I haven't yet made the move to Eclipse 3.5, but after reading a bit about it now, I think I'll do and grab a download.