[
https://issues.apache.org/activemq/browse/SM-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61179#action_61179
]
Freeman Fang commented on SM-1970:
----------------------------------
Just paste the conversation from irc with Geert.
ffang: Geert: can't your xmleditor just add some classpath which include smx
component jars, and the local xsd files is available for you?
[4:15pm] Geert: ffang: It's Eclipse in my case. And yes that would probably be
possible. But is that the way you and other developers do it?
[4:15pm] ffang: Geert: I believe there's no mandatory rule that we must publish
xsd files online
[4:16pm] ffang: Geert: honestly I never use xml editor to write the xml files
for smx endpoint
[4:17pm] Geert: ffang: That's correct, but if you use xmlschemalocation, then
you should use a valid URL. Otherwise there's no need for a schemalocation at
all and you could just create a namespace handler in spring
[4:18pm] Geert: ffang: I think many potential customers will use tools like
Eclipse, Netbeans, and XmlSpy, and all of those will tell the user that the XML
coming out of the archetype is invalid
[4:18pm] ffang: Geert: I do think xml editor should support the case that we
use local xsd files, as this is a valid usecase, let's say, add some classpath
for xmleditor, so that the local xsd and spring.schemas are both available
[4:19pm] ffang: Geert: The point that it's a valid URL with spring.schemas,
isn't it?
[4:23pm] Geert: ffang: I understand your argument, but my understanding is that
an XML document should be valid as-is, without the need for other files.
[4:25pm] Geert: ffang: spring.schemas is not part of the XML spec, so the
document should be validate-able without it.
[4:26pm] Geert: ffang: as mentioned earlier, XML namespaces can be used to link
documents to schema's, you don't need to 'abuse' xmlSchemaLocation for that
[4:26pm] ffang: Geert: but what we are talking about the spring configuration
file, right?
[4:26pm] ffang: Geert: maybe you need a spring editor which support this case
[4:27pm] ffang: Geert: the problem is that you are using xml editor to edit a
spring file, which is more than a xml, right?
[4:28pm] Geert: ffang: No, I've used spring files many times and they're normal
XML files, that should comply to normal XML specification
[4:30pm] ffang: Geert: think about catalog.xml for xml, it's also something
like redirect for the schema location, so you can't say a xml should be valid
as-is
[4:31pm] Geert: ffang: catalog.xml is a nice example of a way to couple
schema's based on their namespace. The XML file should then only define the
namespace and not define a schemaLocation
[4:32pm] Geert: ffang: That would be valid, although still not very user
friendly. Which is why Eclipse only uses the catalog.xml to cache schema's it
downloaded
[4:36pm] ffang: Geert: I think some spring file editor should support the case
that we use local xsd files, as it's a popular case we use with spring, just
add some classpath, and it can parse spring.schemas from classpath
[4:47pm] Geert: ffang: I think you are mistaking about the popularity of using
local schemas instead of resolvable URLs. All of Springs schemas are
downloadable on the URL mentioned in the xmlSchemaLocation attribute. In short:
you can use local schema's, but they are not a replacement for the online
versions.
> Schema location is incorrect for servicemix-quartz-2010.01.0-fuse-02-00.xsd
> in servicemix-quartz archetype
> ----------------------------------------------------------------------------------------------------------
>
> Key: SM-1970
> URL: https://issues.apache.org/activemq/browse/SM-1970
> Project: ServiceMix
> Issue Type: Bug
> Components: archetypes
> Affects Versions: archetypes-2010.01
> Reporter: Geert Schuring
> Assignee: Freeman Fang
>
> after project generation using the archetype, the xbean.xml contains:
> [...]
> xsi:schemaLocation="
> http://servicemix.apache.org/quartz/1.0
> http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> [...]
> The URL
> http://servicemix.apache.org/schema/servicemix-quartz-2010.01.0-fuse-02-00.xsd
> is unresolveable, and results in the XML editor claiming validation errors.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.