简体   繁体   English

在此行找到多个注释cvc-pattern-valid

[英]Multiple annotations found at this line cvc-pattern-valid

In the eclipse , I have a xml ,but it has some errors like : Multiple annotations found at this line: - cvc-pattern-valid: Value 'pf-realtime-security' is not facet-valid with respect to pattern '($| |\\p{L})(\\p{L}|\\p{Nd}| |$)*' for type 'null'. 在eclipse中,我有一个xml,但是它有一些错误:在这一行找到多个注释: - cvc-pattern-valid:值'pf-realtime-security'对于模式而言不是facet-valid'($类型为“null”的| | \\ p {L})(\\ p {L} | \\ p {Nd} | | $)*'。 - cvc-complex-type.2.2: Element 'name' must have no element [children], and the value must be valid. - cvc-complex-type.2.2:元素'name'必须没有元素[children],并且该值必须有效。 Multiple annotations found at this line: - cvc-complex-type.3.2.2: Attribute 'cache-level' is not allowed to appear in element 'int-jms:message-driven-channel-adapter'. 在此行找到多个注释: - cvc-complex-type.3.2.2:不允许在元素'int-jms:message-driven-channel-adapter'中出现属性'cache-level'。 - cvc-complex-type.3.2.2: Attribute 'subscription-durable' is not allowed to appear in element 'int-jms:message-driven-channel- adapter'. - cvc-complex-type.3.2.2:不允许在'int-jms:message-driven-channel-adapter'元素中出现属性'subscription-durable'。 - cvc-complex-type.3.2.2: Attribute 'durable-subscription-name' is not allowed to appear in element 'int-jms:message-driven-channel- adapter'. - cvc-complex-type.3.2.2:不允许在'int-jms:message-driven-channel-adapter'元素中出现属性'durable-subscription-name'。

This is a spring boot project with some xml files from old project , I don't know whether here is a same problem in old project. 这是一个Spring引导项目,包含来自旧项目的一些xml文件,我不知道旧项目中是否存在同样的问题。 But my project always has this problem. 但我的项目总是有这个问题。

<web-fragment id="WebFragment_ID" version="3.0"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
    <display-name>PF Realtime Services Web Application - Security Module</display-name>
    <name>pf-realtime-security</name>
<int-jms:message-driven-channel-adapter connection-factory="primeLocateConnectionFactory"
        destination="primeLocateTopic" acknowledge="auto" auto-startup="true"
        cache-level="1" channel="primeLocateInChannel" pub-sub-domain="true" 
        durable-subscription-name="prime-locate-#{systemProperties['realtime.hostname']}" subscription-durable="true"/>

I expected here should no errors in the xml files. 我希望这里的xml文件中没有错误。

I don't understand the multiple annotations part of the error message, but the complaint about the name element is clear enough: the schema requires it to be a valid Java identifier (defined by a regex pattern), and a valid Java identifier cannot contain hyphens. 我不理解错误消息的multiple annotations部分,但是关于name元素的抱怨足够清楚:架构要求它是有效的Java标识符(由正则表达式模式定义),并且有效的Java标识符不能包含连字符。

Since there are multiple errors in the file and they aren't simply typos, it's quite possible that you shouldn't actually be validating this particular XML document against this particular schema (perhaps you're using the wrong schema?). 由于文件中存在多个错误而且它们不仅仅是拼写错误,因此您很可能不应该针对此特定模式验证此特定XML文档(可能您使用的是错误的模式?)。 But I'm not sufficiently familiar with the territory to advise you on that. 但我对该地区并不十分熟悉,无法就此提出建议。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何分解SaxParseException(cvc-pattern-valid)? - How to dissemble a SaxParseException (cvc-pattern-valid)? cvc-pattern-valid:相对于模式,值不是 facet-valid - cvc-pattern-valid: Value is not facet-valid with respect to pattern cvc-pattern-valid:关于模式&#39;^ [A-Za-z],值&#39;A&#39;不是facet-valid?&#39;&#39;&#39;类型&#39;what&#39; - cvc-pattern-valid: Value 'A' is not facet-valid with respect to pattern '^[A-Za-z]?$' for type 'whatever' 如何解决cvc-pattern-valid:就模式问题而言,值”不是有效方面 - How to resolve cvc-pattern-valid: Value '' is not facet-valid with respect to pattern problem 在此行找到多个注释: - Multiple annotations found at this line: 错误:在此行发现多个注释: - Error : Multiple annotations found at this line: 在此行发现多个注释:-错误:在包&#39;android&#39;中找不到属性&#39;layout_alignBaseLine&#39;的资源标识符 - Multiple annotations found at this line: - error: No resource identifier found for attribute 'layout_alignBaseLine' in package 'android' 在此行发现多个注释:-错误:在包中找不到属性&#39;fetch_user_info&#39;的资源标识符 - Multiple annotations found at this line: - error: No resource identifier found for attribute 'fetch_user_info' in package 在此行发现多个注释:-文档中根元素之后的标记必须格式正确 - Multiple annotations found at this line: - The markup in the document following the root element must be well- formed cvc-datatype-valid.1.2.1:&#39;mylns:xsi&#39;不是&#39;NCName&#39;的有效值 - cvc-datatype-valid.1.2.1: 'mylns:xsi' is not a valid value for 'NCName'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM