Ticket #308 (new defect)
springext.xsd unavailable
| Reported by: | gdb | Owned by: | bruno |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.5 |
| Component: | core/kauri-runtime | Version: | trunk |
| Keywords: | springext.xsd | Cc: |
Description
The XSD "springext.xsd" is currently unavailable.
http://www.kauriproject.org/schemas/runtime/springext.xsd
Is it possible to provide this schema?
Change History
comment:2 Changed 3 years ago by gdb
Ok thanks,
But for spring configuration inside eclipse it expects the schema at the location
http://www.kauriproject.org/schemas/runtime/springext.xsd
Is it possible to put the xsd online?
comment:3 Changed 3 years ago by mpo
To avoid needless downloads (and for better flexibility and version management) most XMLSchema aware tools will provide something like a catalog.
It boils down to providing a mapping between a URI and a known (local) location.
It is general good advise to know how to do apply this in the XML tools you are regularly working with (editors, validators, but something like the Java API too)
Anyway, I just did a quick scan through the eclipse UI and found it in Windows > Preferences (use top box to search for "XML catalog")
comment:4 Changed 3 years ago by gdb
This solved the problem of not founding the XSD I suppose.
I put the entry in the XML catalog as this:
Location: <Path to the file on my filesystem>
Key Type: Namespace Name
Key: http://www.kauriproject.org/schemas/runtime/springext.xsd
But now I get the warning:
Unable to locate Spring NamespaceHandler? for element 'kauri:import-service' of schema namespace 'http://kauriproject.org/runtime/
1.0#springext'
I don't know what I'm doing wrong, or how to fix this?
(It's looks like something is wrong with the XSD?)
comment:5 Changed 3 years ago by mpo
Well, *we* don't even know *what* you are doing, let alone how to fix it :-)
What code is producing this warning? You have a stack-trace at hand?
Maybe this is a good moment to explain what it is you are doing? What you are trying to achieve? The only hint we got here is "for spring configuration inside eclipse"
All of the above isn't needed for just editing the spring xml files, right?
I was guessing up to now that you wanted to get them validated versus the xsd in some way (which I think should work with just the xsd in place.)
Some further info about the topic in the warning: 'handlers'. The way we blend in our own tags into spring is by using so called namespace-handlers. These are classes that get associated to specific namespaces and will be called upon by spring to handle the tags we added.
Spring finds this mapping info in META-INF/spring.handlers and META-INF/spring.schemas
(found in the same jar as the xsd)
So whatever trick you are trying to do the warning sounds like the tool you are using doesn't know about that info.
HTH
comment:6 Changed 3 years ago by gdb
Maybe a detailed information can help you understand my problem:
1-I'm using the spring IDE plugin from location http://springide.org/updatesite/
2-I'm trying to configure a "Spring project nature" as follows
- rigth click on the project and choose for "Spring tools" -> "Add Spring project nature"
- Open the view "Spring Explorer" and get the properties from your project name. by example kauri-samples-common.
- Choose below "Spring" - "Beans Support" for "Scan..." or "Add..." to select your spring configuration files. In this example services.xml.
- Open now the services.xml in the XML editor and see the warning on each kauri command:
"Unable to locate Spring NamespaceHandler? for element 'kauri:module' of schema namespace 'http://kauriproject.org/runtime/1.0#springext'"
(Note : configure a XML catalog entry as I described in comment 4)
See also: http://springide.org/project/wiki/SpringideGuide#AddProjectNature
3-This is indeed not needed for editing. It is a handy tool to get an overview of all spring configuration bean inside a large project and helps with editing the beans, references, preventing typos, code completion, etc ...
4-The jar with the spring.handlers and spring.schemas is included in my project( but i thougt these are only used at runtime). I don't know how the spring IDE tool handle this.
5-This is not a major issue, but nice if it could would work completely. It works for all spring configurations excepts for kauri commands at this time (by me).
for all practical uses you can find the xsd in the source code at
trunk/core/kauri-runtime/src/main/resources/org/kauriproject/runtime/component/kauriruntime-springext.xsd