title: Referencing xsds on classpath when using Spring beans to call xsl
body: <p>So I currently am working on a project that uses Spring to inject a schema location for the xsd when calling an xsl, something like:</p>
  
  <pre><code>&lt;bean id="transformer" class="com.mypackage.Transformer"&gt;
      &lt;property name="xsl" value="sample.xsl" /&gt;                  
      &lt;property name="params"&gt;
          &lt;map&gt;
              &lt;entry key="schemaLocation" value-ref="schema" /&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="schema" class="java.lang.String"&gt;
      &lt;constructor-arg value="http://www.sample.com/schema/sampleSchema.xsd" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>This works fine when you use a url as the schema location, but say for example you want to refer to a schema that is brought in on the classpath as a maven dependency. I've found that using something like 'classpath:sampleSchema.xsd' doesn't work. I would've thought this kind of behaviour was fairly common, is there an accepted workaround to this? Create a custom class that looks up the schema on the classpath and returns its path as a string?</p>