使用不正确的 url 验证 jdoconfig [英] Validating jdoconfig with incorrect url

查看:30
本文介绍了使用不正确的 url 验证 jdoconfig的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 jdo 并使用 jdoconfig.xml 配置持久性管理器

I am using jdo and configuring the persistence manager with jdoconfig.xml

但是,无论我在哪里找到有关 jdoconfig.xml 的文档,它都指出 http://java.sun.com/xml/ns/jdo/jdoconfig 应该用于验证.

However everywhere I find documentation about jdoconfig.xml it states that http://java.sun.com/xml/ns/jdo/jdoconfig should be used for validation.

<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
etc

这个 url 指向一个不存在的文件,我的 xml 验证器报告了一个错误.甚至使用它的目的是什么,我们是否可以相信 url 不会改变并且我们所有的 xml 文件突然停止验证?

This url points to a nonexistent file and my xml validator reports an error. What is the purpose of even using this, can we ever trust that the urls will not change and all our xml files all of a sudden stops validating?

有人知道新网址吗?

推荐答案

xmlns 不是真正的文件/目录,更多的是命名空间,所以不应该存在!附加版本以获得真正的XSD文件,即http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd

The xmlns is not a real file/directory, more a namespace, so ought not exist! The version is appended to get the real XSD file, namely http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd

也许

<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">

这篇关于使用不正确的 url 验证 jdoconfig的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆