[ https://issues.apache.org/activemq/browse/SM-992?page=com.
atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang updated SM-992:
----------------------------
Fix Version/s: (was: 3.2)
3.2.1
> Fix XSD schema locations for use with plain spring
> --------------------------------------------------
>
> Key: SM-992
> URL: http
s://issues.apache.org/activemq/browse/SM-992
> Project: ServiceMix
> Issue Type: Task
> Reporter: Guillaume Nodet
> Fix For: 3.2.1
>
>
> The spring application loaders use validation and
requires a schema location.
> We need to do the same as ActiveMQ did:
> * https://
svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/ma
in/resources/META-INF/spring.schemas
> * http://
activemq.apache.org/xml-reference.html
> * http://activemq.a
pache.org/schemas/
> (12:10:25 PM) gnodet: jstrachan: what did you fix for
the xbean / amq / spring problem ?
> (12:10:43 PM) jstrachan: the spring 2 stuff on the AMQ
lists?
> (12:11:03 PM) gnodet: the schemas locations iirc
> (12:11:26 PM) gnodet: someone just reported the same
problem on smx user list
> (12:11:32 PM) jstrachan: mostly it was to put the XSDs
in a nice place and use a nice URI to the location of the
schemas
> (12:11:32 PM) jstrachan: http://activemq.ap
ache.org/schema/
> (12:11:41 PM) jstrachan: so the namespaces URIS are
like: http://active
mq.apache.org/schema/core/
> (12:11:47 PM) jstrachan: which points to all versions
of the XSD
> (12:12:07 PM) jstrachan: then I've a cron script to
copy 'em there from mvn 1 repo
> (12:12:15 PM) gnodet: and the spring.schemas metadata,
right ?
> (12:12:20 PM) jstrachan: then the other one - and this
was the biggie I guess - was to create a spring.schemas
> (12:12:22 PM) jstrachan: yeah
> (12:12:32 PM) jstrachan: where it takes possible XSD
locations (not namespace URI)
> (12:12:55 PM) jstrachan: this also means you have to in
spring 2 to put the full XSD locations at the top of the XML
file
> (12:13:11 PM) gnodet: yeah, because of strict
validation
> (12:13:18 PM) jstrachan: http://
activemq.apache.org/xml-reference.html
> (12:13:25 PM) jstrachan: yeah
> (12:13:32 PM) gnodet: ok, thx
> (12:13:43 PM) jstrachan: though there's no reason why
an EntityResolver can't resolve an XSD purely on the
namespace URI
> (12:14:03 PM) jstrachan: seems a bit bizarre that
spring only supports namespace resolving on the XSD location
(which is an optional thing)
> (12:14:26 PM) jstrachan: AFAIK an xml parser can still
validate, so long as an EntityResolver can find the XSD
location
> (12:14:38 PM) jstrachan: (I might be wrong on that -
but I thought that was the case)
> (12:16:26 PM) jstrachan: here's the spring.schemas: https://
svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/ma
in/resources/META-INF/spring.schemas
> (12:16:26 PM) jstrachan: notice how it points the XSD
location to the local embedded xsd
> (12:17:32 PM) gnodet: yeah
> (12:17:40 PM) jstrachan: I did 2 kinds, like spring do
- one XSD with no version number (which always resolves to
the one on the classpath) and one using the actual version -
only the first 2 lines are useful
> (12:18:01 PM) jstrachan: (I experimented adding the
namespace URI in there but its never used)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|