在eclipse中用Rinzo插件编辑XML,生成了一个XSD,XML文件引用这个XSD,但我仍然可以输入任意元素或属性,属性的界定范围也不起作用,只要符合XML基本规范就不报错,这是怎么回事呢?
我打开Spring的配置文件xml,如果输入的属性或元素名不正确就立即显示红色,我看了它的schema文件也没看出问题来。
我打开Spring的配置文件xml,如果输入的属性或元素名不正确就立即显示红色,我看了它的schema文件也没看出问题来。
解决方案 »
- java byte[]类型 base64解密
- 请大家给我找一些JAVA程序员比C++程序员聪明的一些理由,我要收集
- Hibernate的生成策略native和uuid
- Strtus1.3关于 已存在表单Bean 来当form的类型的问题
- jsp加载写好的class报错,看看我哪个地方做的有问题?
- 结合IronTrack SQL和P6Spy监控SQL性能的出现的问题
- 向oracle中的blob字段插入数据老是包错,大家看看
- 一个不知道难不难的问题,在线等待,救急啊啊啊啊啊啊啊啊啊啊
- 下一页的代码有问题吗?
- WebSphere找不到JNDI?
- netbeans jLabel图片缩放代码
- ________struts1.2文件上问题
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
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">
改为(beans.xsd是我保存到本地的):
<beans orderid="889923"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="beans.xsd">
也不行了,难道schema不能使用本地文件吗?
xsi:noNamespaceSchemaLocation="beans.xsd">
你的beans.xsd文件放在哪里?
我传到一个网站上,用schemaLocation方式,能出来了,但报错如下:
-schemaLocation value = 'http://www.dcharts.com/component.xsd' must have even number of URI's.引用是这样写的:<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://www.dcharts.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.dcharts.com/component.xsd">
<component name="" id="" instance-scope="SITE">
......
需要加版本号
xsi:schemaLocation="http://www.dcharts.com http://www.dcharts.com/component.xsd"