Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » XSD warning that I can't track down
XSD warning that I can't track down [message #210988] Tue, 25 March 2008 22:35 Go to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

The project I'm working on generates some XML files (Spring config
files) and uses the WST XML editor to view them and/or beautify them
(via our own custom builder). Whenever the beautify runs on one
particular file or it is opened in the WST XML editor, we are seeing
this annoying warning in the error log:
"White spaces are required between publicId and systemId"

The XML does not declare a DOCTYPE, it uses schema. I've googled and
googled and can't track down the source of the problem. Any pointers?

Here is the first part of the generated XML that seems to trigger the
warning:

<?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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context -2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">



Here is the stack trace from the warning:

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: White spaces
are required between publicId and systemId.
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:348)
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:376)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:686)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchemaLocatorImpl.java:56)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.locateSchema(XSD SchemaDirectiveImpl.java:413)
at
org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:352)
at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:420)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2192)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2225)
at
org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSD SchemaImpl.java:2284)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDef inition(XSDConcreteComponentImpl.java:2346)
at
org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:1001)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
at
org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:785)
at
org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:548)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1544)
at
org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2402)
at
org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1240)
at
org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:837)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:760)
at org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:213)
at
org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
at
org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:39)
at
org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
at
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:267)
at
org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:239 )
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xml.sax.SAXParseException: White spaces are required
between publicId and systemId.
at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(D OMParser.java:264)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl. parse(DocumentBuilderImpl.java:292)
at
org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:339)
... 31 more
Re: XSD warning that I can't track down [message #211002 is a reply to message #210988] Tue, 25 March 2008 22:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

This is a multi-part message in MIME format.
--------------000702020405090107070608
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Attached is a simple file that, if opened in the WST XML editor, will
produce the warning messages in the Error Log.

Eclipse 3.3.0/3.3.1/3.3.2
Web Standard Tools
Version: 2.0.1.v200709110510-7C-778k0JWNr93WEIHvplSVojWel
Build id: 200706130253


Eric Rizzo wrote:
> The project I'm working on generates some XML files (Spring config
> files) and uses the WST XML editor to view them and/or beautify them
> (via our own custom builder). Whenever the beautify runs on one
> particular file or it is opened in the WST XML editor, we are seeing
> this annoying warning in the error log:
> "White spaces are required between publicId and systemId"
>
> The XML does not declare a DOCTYPE, it uses schema. I've googled and
> googled and can't track down the source of the problem. Any pointers?
>
> Here is the first part of the generated XML that seems to trigger the
> warning:
>
> <?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:p="http://www.springframework.org/schema/p"
> xmlns:tx="http://www.springframework.org/schema/tx"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:aop="http://www.springframework.org/schema/aop"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
> http://www.springframework.org/schema/context
>
> http://www.springframework.org/schema/context/spring-context -2.5.xsd
> http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>
>
>
> Here is the stack trace from the warning:
>
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: White spaces
> are required between publicId and systemId.
> at
> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:348)
> at
> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:376)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:686)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchemaLocatorImpl.java:56)
>
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.locateSchema(XSD SchemaDirectiveImpl.java:413)
>
> at
> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:352)
>
> at
> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:420)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2192)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2225)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSD SchemaImpl.java:2284)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDef inition(XSDConcreteComponentImpl.java:2346)
>
> at
> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:1001)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>
> at
> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:785)
>
> at
> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:548)
>
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>
> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1544)
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2402)
> at
> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1240)
>
> at
> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:837)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:760)
> at
> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:213)
>
> at
> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
>
> at
> org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:39)
>
> at
> org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
>
> at
> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:267)
>
> at
> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:239 )
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: org.xml.sax.SAXParseException: White spaces are required
> between publicId and systemId.
> at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(D OMParser.java:264)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl. parse(DocumentBuilderImpl.java:292)
>
> at
> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:339)
> ... 31 more


--------------000702020405090107070608
Content-Type: text/xml;
name="test.xml"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="test.xml"

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxiZWFu cyB4bWxucz0i
aHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS9iZWFucyIg eG1sbnM6eHNp
PSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIg eG1sbnM6cD0i
aHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS9wIiB4bWxu czp0eD0iaHR0
cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS90eCINCgl4bWxu czpjb250ZXh0
PSJodHRwOi8vd3d3LnNwcmluZ2ZyYW1ld29yay5vcmcvc2NoZW1hL2NvbnRl eHQiIHhtbG5z
OmFvcD0iaHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS9h b3AiDQoJeHNp
OnNjaGVtYUxvY2F0aW9uPSJodHRwOi8vd3d3LnNwcmluZ2ZyYW1ld29yay5v cmcvc2NoZW1h
L2JlYW5zIA0KICAgICAgICBodHRwOi8vd3d3LnNwcmluZ2ZyYW1ld29yay5v cmcvc2NoZW1h
L2JlYW5zL3NwcmluZy1iZWFucy0yLjUueHNkDQogICAgICAgIGh0dHA6Ly93 d3cuc3ByaW5n
ZnJhbWV3b3JrLm9yZy9zY2hlbWEvY29udGV4dCANCiAgICAgICAgaHR0cDov L3d3dy5zcHJp
bmdmcmFtZXdvcmsub3JnL3NjaGVtYS9jb250ZXh0L3NwcmluZy1jb250ZXh0 LTIuNS54c2QN
CgkgICAgaHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS90 eCANCgkgICAg
aHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3NjaGVtYS90eC9zcHJp bmctdHgtMi4w
LnhzZA0KICAgICAgICBodHRwOi8vd3d3LnNwcmluZ2ZyYW1ld29yay5vcmcv c2NoZW1hL2Fv
cCANCiAgICAgICAgaHR0cDovL3d3dy5zcHJpbmdmcmFtZXdvcmsub3JnL3Nj aGVtYS9hb3Av
c3ByaW5nLWFvcC0yLjAueHNkIj4NCg0KPC9iZWFucz4=
--------------000702020405090107070608--
Re: XSD warning that I can't track down [message #211022 is a reply to message #211002] Wed, 26 March 2008 04:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: valentinbaciu.hotmail.com

Hi Eric, here's what I think happens here:
- the XML file is opened with the XML editor
- after a short delay, the editor tries to build the grammars (content
models) for the schemas specified through the schemaLocation hint (the
formatter is also using the content model)
- the content model API uses the XSD content model factory which in turn
uses the XSD EMF model to create a content model representation of the
grammars
- a few of the schemas (context and tx) import and actually reference
components from the main beans schema like this
<xsd:import namespace="http://www.springframework.org/schema/beans"/>
Note the lack of schemaLocation hint in the import statement.
- the XSD location resolver uses the extensible URI resolver plug-in and
associated extensions (XML catalog) to locate the schema
- because nothing is found in the catalog for that namespace URI the code
will eventually try to find a schema physically located at URI specified by
the namespace attribute
- before opening the location the code will ask the URI resolver for a
physical location for the "file"
- the URI resolver consults the WTP internet cache which is registered as a
physical location resolver
- the internet cache determines it doesn't have the file, and tries to
retrieve and cache what it believes is a schema located at that URI and it
succeeds in doing so
- the issue is that the resource pointed to by that URI is a plain web page
not the expected xsd file. The first line in that HTML file looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
- the resolver feeds this file through the XSD EMF model's XML parser (see
XSDResourceImpl) which produces the exception and log message you are seeing

You can see all this in action if you put a breakpoint in
org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchema,
String, String, String).

Given that it's unlikely you can modify the spring schema to add a
schemaLocation hint with the real schema location, one possible workaround
is to add an entry to the XML catalog:

Location: http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
URI: http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
Key Type: Namespace Name
Key: http://www.springframework.org/schema/beans

Or you could go all the way and add all these schemas to the catalog and
avoid going to the internet at all to retrieve them.

I hope this helps.

Regards,
Valentin

"Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
news:fsbuvv$46c$1@build.eclipse.org...
> Attached is a simple file that, if opened in the WST XML editor, will
> produce the warning messages in the Error Log.
>
> Eclipse 3.3.0/3.3.1/3.3.2
> Web Standard Tools
> Version: 2.0.1.v200709110510-7C-778k0JWNr93WEIHvplSVojWel
> Build id: 200706130253
>
>
> Eric Rizzo wrote:
>> The project I'm working on generates some XML files (Spring config
>> files) and uses the WST XML editor to view them and/or beautify them
>> (via our own custom builder). Whenever the beautify runs on one
>> particular file or it is opened in the WST XML editor, we are seeing
>> this annoying warning in the error log:
>> "White spaces are required between publicId and systemId"
>>
>> The XML does not declare a DOCTYPE, it uses schema. I've googled and
>> googled and can't track down the source of the problem. Any pointers?
>>
>> Here is the first part of the generated XML that seems to trigger the
>> warning:
>>
>> <?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:p="http://www.springframework.org/schema/p"
>> xmlns:tx="http://www.springframework.org/schema/tx"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xmlns:aop="http://www.springframework.org/schema/aop"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>> http://www.springframework.org/schema/context
>>
>> http://www.springframework.org/schema/context/spring-context -2.5.xsd
>> http://www.springframework.org/schema/tx
>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>> http://www.springframework.org/schema/aop
>> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>>
>>
>>
>> Here is the stack trace from the warning:
>>
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: White spaces
>> are required between publicId and systemId.
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:348)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:376)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:686)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchemaLocatorImpl.java:56)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.locateSchema(XSD SchemaDirectiveImpl.java:413)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:352)
>>
>> at
>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:420)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2192)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2225)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSD SchemaImpl.java:2284)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDef inition(XSDConcreteComponentImpl.java:2346)
>>
>> at
>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:1001)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>
>> at
>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:785)
>>
>> at
>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:548)
>>
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>
>> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1544)
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2402)
>> at
>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1240)
>>
>> at
>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:837)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:760)
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:213)
>>
>> at
>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
>>
>> at
>> org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:39)
>>
>> at
>> org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
>>
>> at
>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:267)
>>
>> at
>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:239 )
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> Caused by: org.xml.sax.SAXParseException: White spaces are required
>> between publicId and systemId.
>> at
>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(D OMParser.java:264)
>>
>> at
>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl. parse(DocumentBuilderImpl.java:292)
>>
>> at
>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:339)
>> ... 31 more
>
>


------------------------------------------------------------ --------------------


> <?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:p="http://www.springframework.org/schema/p"
> xmlns:tx="http://www.springframework.org/schema/tx"
> xmlns:context="http://www.springframework.org/schema/context"
> xmlns:aop="http://www.springframework.org/schema/aop"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
> http://www.springframework.org/schema/context
>
> http://www.springframework.org/schema/context/spring-context -2.5.xsd
> http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>
> </beans>
Re: XSD warning that I can't track down [message #211033 is a reply to message #211022] Wed, 26 March 2008 13:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Wow, Valentin! Thanks for the detailed and helpful analysis. Much of
this stuff is above my level of XML understanding, so I would not have
been able to narrow it down so precisely.

In fact, my client has a relationship with the Spring team and we may
pass this info on to them.

As for adding entries to the XML catalog, is there API for doing that?
We are building a tool that is offered as both RCP and a set of plugins,
so we'd need a way to inject into the catalog via code. Alternatively,
is there any way to deploy the schemas locally (for example, in a JAR
that is included on the classpath) to avoid the internet lookup
altogether? I seem to remember back in the "good ol' days" DTDs could be
included locally and the parsers could be told to use the local copy
instead of trying to resolve them on the web (please pardon my limited
understanding of schema and XML in general).
I'm happy to do the bulk of the research and coding, but some pointers
in the right direction would be very helpful. Even if the only option is
internal packages, I'd like to know about it so I can help my client
make an informed decision.

Many thanks,
Eric


Valentin wrote:
> Hi Eric, here's what I think happens here:
> - the XML file is opened with the XML editor
> - after a short delay, the editor tries to build the grammars (content
> models) for the schemas specified through the schemaLocation hint (the
> formatter is also using the content model)
> - the content model API uses the XSD content model factory which in turn
> uses the XSD EMF model to create a content model representation of the
> grammars
> - a few of the schemas (context and tx) import and actually reference
> components from the main beans schema like this
> <xsd:import namespace="http://www.springframework.org/schema/beans"/>
> Note the lack of schemaLocation hint in the import statement.
> - the XSD location resolver uses the extensible URI resolver plug-in and
> associated extensions (XML catalog) to locate the schema
> - because nothing is found in the catalog for that namespace URI the code
> will eventually try to find a schema physically located at URI specified by
> the namespace attribute
> - before opening the location the code will ask the URI resolver for a
> physical location for the "file"
> - the URI resolver consults the WTP internet cache which is registered as a
> physical location resolver
> - the internet cache determines it doesn't have the file, and tries to
> retrieve and cache what it believes is a schema located at that URI and it
> succeeds in doing so
> - the issue is that the resource pointed to by that URI is a plain web page
> not the expected xsd file. The first line in that HTML file looks like this:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> - the resolver feeds this file through the XSD EMF model's XML parser (see
> XSDResourceImpl) which produces the exception and log message you are seeing
>
> You can see all this in action if you put a breakpoint in
> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchema,
> String, String, String).
>
> Given that it's unlikely you can modify the spring schema to add a
> schemaLocation hint with the real schema location, one possible workaround
> is to add an entry to the XML catalog:
>
> Location: http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
> URI: http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
> Key Type: Namespace Name
> Key: http://www.springframework.org/schema/beans
>
> Or you could go all the way and add all these schemas to the catalog and
> avoid going to the internet at all to retrieve them.
>
> I hope this helps.
>
> Regards,
> Valentin
>
> "Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
> news:fsbuvv$46c$1@build.eclipse.org...
>> Attached is a simple file that, if opened in the WST XML editor, will
>> produce the warning messages in the Error Log.
>>
>> Eclipse 3.3.0/3.3.1/3.3.2
>> Web Standard Tools
>> Version: 2.0.1.v200709110510-7C-778k0JWNr93WEIHvplSVojWel
>> Build id: 200706130253
>>
>>
>> Eric Rizzo wrote:
>>> The project I'm working on generates some XML files (Spring config
>>> files) and uses the WST XML editor to view them and/or beautify them
>>> (via our own custom builder). Whenever the beautify runs on one
>>> particular file or it is opened in the WST XML editor, we are seeing
>>> this annoying warning in the error log:
>>> "White spaces are required between publicId and systemId"
>>>
>>> The XML does not declare a DOCTYPE, it uses schema. I've googled and
>>> googled and can't track down the source of the problem. Any pointers?
>>>
>>> Here is the first part of the generated XML that seems to trigger the
>>> warning:
>>>
>>> <?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:p="http://www.springframework.org/schema/p"
>>> xmlns:tx="http://www.springframework.org/schema/tx"
>>> xmlns:context="http://www.springframework.org/schema/context"
>>> xmlns:aop="http://www.springframework.org/schema/aop"
>>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>>> http://www.springframework.org/schema/context
>>>
>>> http://www.springframework.org/schema/context/spring-context -2.5.xsd
>>> http://www.springframework.org/schema/tx
>>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>>> http://www.springframework.org/schema/aop
>>> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>>>
>>>
>>>
>>> Here is the stack trace from the warning:
>>>
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: White spaces
>>> are required between publicId and systemId.
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:348)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:376)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:686)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>
>>> at
>>> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchemaLocatorImpl.java:56)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.locateSchema(XSD SchemaDirectiveImpl.java:413)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:352)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:420)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2192)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2225)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSD SchemaImpl.java:2284)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDef inition(XSDConcreteComponentImpl.java:2346)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:1001)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:785)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:548)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>>
>>> at org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1544)
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2402)
>>> at
>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1240)
>>>
>>> at
>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:837)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:760)
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>>> at
>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>
>>> at
>>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:213)
>>>
>>> at
>>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
>>>
>>> at
>>> org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:39)
>>>
>>> at
>>> org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
>>>
>>> at
>>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:267)
>>>
>>> at
>>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:239 )
>>>
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>> Caused by: org.xml.sax.SAXParseException: White spaces are required
>>> between publicId and systemId.
>>> at
>>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(D OMParser.java:264)
>>>
>>> at
>>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl. parse(DocumentBuilderImpl.java:292)
>>>
>>> at
>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:339)
>>> ... 31 more
>>
>
>
> ------------------------------------------------------------ --------------------
>
>
>> <?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:p="http://www.springframework.org/schema/p"
>> xmlns:tx="http://www.springframework.org/schema/tx"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xmlns:aop="http://www.springframework.org/schema/aop"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>> http://www.springframework.org/schema/context
>>
>> http://www.springframework.org/schema/context/spring-context -2.5.xsd
>> http://www.springframework.org/schema/tx
>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>> http://www.springframework.org/schema/aop
>> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>>
>> </beans>
>
>
Re: XSD warning that I can't track down [message #211051 is a reply to message #211033] Wed, 26 March 2008 13:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: valentinbaciu.hotmail.com

Eric, you're welcome.

For adding XML catalog entries programatically you can start with
org.eclipse.wst.xml.core.internal.XMLCorePlugin.getDefaultXM LCatalog() and
go from there. I'm sure you'll find some JUnits with some example in using
the catalog API. For example,
org.eclipse.wst.xsd.validation.tests.internal.BugFixesTest.t estInvalidSchemaInXMLCatalog()
in the org.eclipse.wst.xsd.validation.tests plug-in.

In case you're wondering where the XML catalog is persisted you can find the
files here: <workspace>\.metadata\.plugins\org.eclipse.wst.xml.core. They
may not show up until you change the catalog throuh UI or programatically.
Similar for the files cached by the internet cache, you'll find them here
<workspace>\.metadata\.plugins\org.eclipse.wst.internet.cache

I'm not aware of a mechanism like the alternative one you're suggesting.

Regards, Valentin

"Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
news:fsdhle$r1q$1@build.eclipse.org...
> Wow, Valentin! Thanks for the detailed and helpful analysis. Much of this
> stuff is above my level of XML understanding, so I would not have been
> able to narrow it down so precisely.
>
> In fact, my client has a relationship with the Spring team and we may pass
> this info on to them.
>
> As for adding entries to the XML catalog, is there API for doing that? We
> are building a tool that is offered as both RCP and a set of plugins, so
> we'd need a way to inject into the catalog via code. Alternatively, is
> there any way to deploy the schemas locally (for example, in a JAR that is
> included on the classpath) to avoid the internet lookup altogether? I seem
> to remember back in the "good ol' days" DTDs could be included locally and
> the parsers could be told to use the local copy instead of trying to
> resolve them on the web (please pardon my limited understanding of schema
> and XML in general).
> I'm happy to do the bulk of the research and coding, but some pointers in
> the right direction would be very helpful. Even if the only option is
> internal packages, I'd like to know about it so I can help my client make
> an informed decision.
>
> Many thanks,
> Eric
>
>
> Valentin wrote:
>> Hi Eric, here's what I think happens here:
>> - the XML file is opened with the XML editor
>> - after a short delay, the editor tries to build the grammars (content
>> models) for the schemas specified through the schemaLocation hint (the
>> formatter is also using the content model)
>> - the content model API uses the XSD content model factory which in turn
>> uses the XSD EMF model to create a content model representation of the
>> grammars
>> - a few of the schemas (context and tx) import and actually reference
>> components from the main beans schema like this
>> <xsd:import namespace="http://www.springframework.org/schema/beans"/>
>> Note the lack of schemaLocation hint in the import statement.
>> - the XSD location resolver uses the extensible URI resolver plug-in and
>> associated extensions (XML catalog) to locate the schema
>> - because nothing is found in the catalog for that namespace URI the code
>> will eventually try to find a schema physically located at URI specified
>> by the namespace attribute
>> - before opening the location the code will ask the URI resolver for a
>> physical location for the "file"
>> - the URI resolver consults the WTP internet cache which is registered as
>> a physical location resolver
>> - the internet cache determines it doesn't have the file, and tries to
>> retrieve and cache what it believes is a schema located at that URI and
>> it succeeds in doing so
>> - the issue is that the resource pointed to by that URI is a plain web
>> page not the expected xsd file. The first line in that HTML file looks
>> like this:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
>> - the resolver feeds this file through the XSD EMF model's XML parser
>> (see XSDResourceImpl) which produces the exception and log message you
>> are seeing
>>
>> You can see all this in action if you put a breakpoint in
>> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchema,
>> String, String, String).
>>
>> Given that it's unlikely you can modify the spring schema to add a
>> schemaLocation hint with the real schema location, one possible
>> workaround is to add an entry to the XML catalog:
>>
>> Location:
>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>> URI: http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>> Key Type: Namespace Name
>> Key: http://www.springframework.org/schema/beans
>>
>> Or you could go all the way and add all these schemas to the catalog and
>> avoid going to the internet at all to retrieve them.
>>
>> I hope this helps.
>>
>> Regards,
>> Valentin
>>
>> "Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
>> news:fsbuvv$46c$1@build.eclipse.org...
>>> Attached is a simple file that, if opened in the WST XML editor, will
>>> produce the warning messages in the Error Log.
>>>
>>> Eclipse 3.3.0/3.3.1/3.3.2
>>> Web Standard Tools
>>> Version: 2.0.1.v200709110510-7C-778k0JWNr93WEIHvplSVojWel
>>> Build id: 200706130253
>>>
>>>
>>> Eric Rizzo wrote:
>>>> The project I'm working on generates some XML files (Spring config
>>>> files) and uses the WST XML editor to view them and/or beautify them
>>>> (via our own custom builder). Whenever the beautify runs on one
>>>> particular file or it is opened in the WST XML editor, we are seeing
>>>> this annoying warning in the error log:
>>>> "White spaces are required between publicId and systemId"
>>>>
>>>> The XML does not declare a DOCTYPE, it uses schema. I've googled and
>>>> googled and can't track down the source of the problem. Any pointers?
>>>>
>>>> Here is the first part of the generated XML that seems to trigger the
>>>> warning:
>>>>
>>>> <?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:p="http://www.springframework.org/schema/p"
>>>> xmlns:tx="http://www.springframework.org/schema/tx"
>>>> xmlns:context="http://www.springframework.org/schema/context"
>>>> xmlns:aop="http://www.springframework.org/schema/aop"
>>>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>>>>
>>>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>>>> http://www.springframework.org/schema/context
>>>>
>>>> http://www.springframework.org/schema/context/spring-context -2.5.xsd
>>>> http://www.springframework.org/schema/tx
>>>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>>>> http://www.springframework.org/schema/aop
>>>> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>>>>
>>>>
>>>>
>>>> Here is the stack trace from the warning:
>>>>
>>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: White
>>>> spaces
>>>> are required between publicId and systemId.
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:348)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:376)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:686)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>
>>>> at
>>>> org.eclipse.wst.xsd.contentmodel.internal.util.XSDSchemaLoca torImpl.locateSchema(XSDSchemaLocatorImpl.java:56)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.locateSchema(XSD SchemaDirectiveImpl.java:413)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchem aDirectiveImpl.java:352)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImp l.java:420)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaIm pl.java:2192)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveNamedComponent(XSD SchemaImpl.java:2225)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.resolveTypeDefinition(XSD SchemaImpl.java:2284)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.resolveTypeDef inition(XSDConcreteComponentImpl.java:2346)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDComplexTypeDefinitionImpl.patch(XSDC omplexTypeDefinitionImpl.java:1001)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDNamedComponentImpl.patch(XSDNamedCom ponentImpl.java:785)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDElementDeclarationImpl.patch(XSDElem entDeclarationImpl.java:548)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.patch(XSDConcr eteComponentImpl.java:534)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.patch(XSDSchemaImpl.java: 1544)
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.changeAttribute(XSDSchema Impl.java:2402)
>>>> at
>>>> org.eclipse.xsd.impl.XSDConcreteComponentImpl.eNotify(XSDCon creteComponentImpl.java:1240)
>>>>
>>>> at
>>>> org.eclipse.xsd.impl.XSDSchemaImpl.setSchemaLocation(XSDSche maImpl.java:837)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:760)
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.doLoad(XSDResourceImpl. java:789)
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>
>>>> at
>>>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildXSDMo del(XSDImpl.java:213)
>>>>
>>>> at
>>>> org.eclipse.wst.xsd.contentmodel.internal.XSDImpl.buildCMDoc ument(XSDImpl.java:172)
>>>>
>>>> at
>>>> org.eclipse.wst.xsd.contentmodel.internal.CMDocumentFactoryX SD.createCMDocument(CMDocumentFactoryXSD.java:39)
>>>>
>>>> at
>>>> org.eclipse.wst.xml.core.internal.contentmodel.ContentModelM anager.createCMDocument(ContentModelManager.java:56)
>>>>
>>>> at
>>>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl.buildCMDocument(CMDocumentManagerImp l.java:267)
>>>>
>>>> at
>>>> org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimp l.CMDocumentManagerImpl$1.run(CMDocumentManagerImpl.java:239 )
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> Caused by: org.xml.sax.SAXParseException: White spaces are required
>>>> between publicId and systemId.
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(D OMParser.java:264)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl. parse(DocumentBuilderImpl.java:292)
>>>>
>>>> at
>>>> org.eclipse.xsd.util.XSDResourceImpl.getDocument(XSDResource Impl.java:339)
>>>> ... 31 more
>>>
>>
>>
>> ------------------------------------------------------------ --------------------
>>
>>
>>> <?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:p="http://www.springframework.org/schema/p"
>>> xmlns:tx="http://www.springframework.org/schema/tx"
>>> xmlns:context="http://www.springframework.org/schema/context"
>>> xmlns:aop="http://www.springframework.org/schema/aop"
>>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.5 .xsd
>>> http://www.springframework.org/schema/context
>>>
>>> http://www.springframework.org/schema/context/spring-context -2.5.xsd
>>> http://www.springframework.org/schema/tx
>>> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
>>> http://www.springframework.org/schema/aop
>>> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
>>>
>>> </beans>
>>
Re: XSD warning that I can't track down [message #211105 is a reply to message #211051] Wed, 26 March 2008 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Valentin wrote:
> Eric, you're welcome.
>
> For adding XML catalog entries programatically you can start with
> org.eclipse.wst.xml.core.internal.XMLCorePlugin.getDefaultXM LCatalog() and
> go from there. I'm sure you'll find some JUnits with some example in using
> the catalog API. For example,
> org.eclipse.wst.xsd.validation.tests.internal.BugFixesTest.t estInvalidSchemaInXMLCatalog()
> in the org.eclipse.wst.xsd.validation.tests plug-in.
>
> In case you're wondering where the XML catalog is persisted you can find the
> files here: <workspace>\.metadata\.plugins\org.eclipse.wst.xml.core. They
> may not show up until you change the catalog throuh UI or programatically.
> Similar for the files cached by the internet cache, you'll find them here
> <workspace>\.metadata\.plugins\org.eclipse.wst.internet.cache
>
> I'm not aware of a mechanism like the alternative one you're suggesting.
>

An even easier way, is to add the appropriate entries through the XML
Catalog Extension point. This way you can create an Eclipse plugin,
that you distribute that just contributes the appropriate XSDs to the
XML Catalog through the extension point. No messy api programming needed.

Dave
Re: XSD warning that I can't track down [message #211193 is a reply to message #211105] Thu, 27 March 2008 19:45 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

David Carver wrote:
> Valentin wrote:
>> Eric, you're welcome.
>>
>> For adding XML catalog entries programatically you can start with
>> org.eclipse.wst.xml.core.internal.XMLCorePlugin.getDefaultXM LCatalog()
>> and go from there. I'm sure you'll find some JUnits with some example
>> in using the catalog API. For example,
>> org.eclipse.wst.xsd.validation.tests.internal.BugFixesTest.t estInvalidSchemaInXMLCatalog()
>> in the org.eclipse.wst.xsd.validation.tests plug-in.
>
> An even easier way, is to add the appropriate entries through the XML
> Catalog Extension point. This way you can create an Eclipse plugin,
> that you distribute that just contributes the appropriate XSDs to the
> XML Catalog through the extension point. No messy api programming needed.
>
> Dave

Thanks, Dave. That worked like a charm; warnings have been banished.
I owe you both a beer at next year's EclipseCon!

Eric
Previous Topic:Server start timeout preference
Next Topic:Tomcat Silent Deploy
Goto Forum:
  


Current Time: Fri Apr 19 23:18:27 GMT 2024

Powered by FUDForum. Page generated in 0.03950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top