java - XML schema location best practices -
after seeing quite more cryptic error message, realize may due bogus uris present here:
<?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://activemq.apache.org/camel/schema/cxfendpoint" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd http://activemq.apache.org/camel/schema/cxfendpoint http://activemq.apache.org/camel/schema/cxf/cxfendpoint.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd ">
is practice refer online schemas?
from above, example:
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
works fine, cute , when you've got no internet issue , when springframework.org etc. then, above, there's also:
http://activemq.apache.org/camel/schema/cxf/cxfendpoint.xsd
which gives:
"oops! link appears broken"
oops indeed.
what best practice regarding uris referring schema in project?
bonus question: how comes eclipse doesn't complain in real-time broken links? (intellij idea right!?)
spring not load schemas on net when starting container - there mechanism embed schemas within jar files of spring, , spring uses these built-in schemas validate xml. applicable custom namespaces too.
eclipse may complain, because eclipse downloads schemas based on schema uri, may not hosted on net, in case, there way cache custom schemas within eclipse preferences also.
Comments
Post a Comment