Jon Brisbin wrote:
> I don't have any examples handy, but I've done something like this
> before by registering a protocol handler and using urls like
> "classpath:/org/mypackage/etc.xml".
> jb
> On Sep 22, 2009, at 4:53 PM, Steven Waldren wrote:
>> Hello,
>> I have run into a little issue. I want to be able to load some XSLT
>> files that are in the Classpath (org.mine.xslt.samplexslt.xsl). I
>> tried to use MyClass.class.getResourceAsStream("/org/mine/xslt/
>> samplexslt.xsl"), but I then run into problems because the
>> samplexslt.xsl has an <xsl:import href"./date/difference/
>> date.difference.xsl"/> (since it in in a sub-package). When I load
>> the samplexslt.xsl it throws an error because it cannot find
>> date.difference.xslt.
>> When I change the xsl:import href to "src/org/mine/xslt/date/
>> difference/date.difference.xsl" The XSLT will compile. This does not
>> seem to be a good approach.
>> Any direction on best practices to load non-java files that reference
>> other files from the classpath?
>> Thanks for any help.
>> Best,
>> Steven
>> --
>> Steven Waldren
>> swald...@gmail.com <mailto:swald...@gmail.com>
>> GnuPGP Key:
>> https://keyserver2.pgp.com/vkd/DownloadKey.event?keyid=0xEE7A9BE0A97A...
>> Thanks!
>> Jon Brisbin
>> http://jbrisbin.com/
--