You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Paul Foxworthy (JIRA)" <ji...@apache.org> on 2016/11/23 03:09:58 UTC

[jira] [Commented] (OFBIZ-6807) UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [web-app_3_0.xsd]

    [ https://issues.apache.org/jira/browse/OFBIZ-6807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15688726#comment-15688726 ] 

Paul Foxworthy commented on OFBIZ-6807:
---------------------------------------

schemaLocation and noNamespaceSchemaLocation are hacks. It is silly to expect an XML document to know the right place for its schema. So its good that you removed schemaLocation from the webapp files.

However, there are still thousands of noNamespaceSchemaLocation in other XML files.

What the XML files *should* have is a namespace. Then external tools can map from the namespace to a catalogue of schemas to validate elements within those namespaces.

I suspect the noNamespaceSchemaLocation attributes are there because people were used to SGML and SGML-like documents (including HTML) having a DOCTYPE that refers to a location for a DTD. With experience, that has turned out to be a mistake - note in HTML5 you just say "it's HTML", no mention of a DTD.

So if you're doing anything to improve XML files, I suggest you include a namespace instead of schemaLocation and noNamespaceSchemaLocation. XML validators and IDEs like IntelliJ IDEA and Eclipse can find the right schema based on the namespace.

> UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [web-app_3_0.xsd]
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6807
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6807
>             Project: OFBiz
>          Issue Type: Bug
>    Affects Versions: Release Branch 14.12, Trunk, Release Branch 15.12
>            Reporter: Deepak Dixit
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>
> System throws following exception on server start:
> {code}
> [java] 2016-01-16 15:04:50,942 |catalina-startup-2   |UtilXml                       |W| [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [web-app_3_0.xsd]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)