Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 10/30/2006 10:53:12 AM:
> /Simon Vogensen/: > > > My problem is this: how do I load these schemas from jar resources? > > I guess because the jar: URIs are opaque [1], relative resources > can't be resolved automatically so you would need to assign a custom > entity resolver to handle those. Actually the issue is with passing the parser an InputStream as the schema source. The schema loader will fallback to using the current working directory (the value of the system property user.dir) as the base URI for resolution since it has no idea where your document is located. If you wrap the InputStream in an InputSource and set the system ID on this object it should work. > [1] <http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html>: > > > An opaque URI is an absolute URI whose scheme-specific part does not > > begin with a slash character ('/'). Opaque URIs are not subject to > > further parsing. > > -- > Stanimir > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
