Because the xsd says '-' is not allowed. The name of a web-fragment must be a 
valid java identity name which matches the pattern 
`($|_|\p{L})(\p{L}|\p{Nd}|_|$)*`

**web-fragment_3_0.xsd line 107 says:**
`<xsd:element name="web-fragment" type="javaee:web-fragmentType"> `
**web-common_3_0.xsd line 210-214 says:**
 ```
<xsd:complexType name="web-fragmentType">
    <xsd:choice minOccurs="0"
                maxOccurs="unbounded">
      <xsd:element name="name"
                   type="javaee:java-identifierType"/>

```
**and javaee_6.xsd line 1069-1084 says:** 
```
  <xsd:complexType name="java-identifierType">
    <xsd:annotation>
      <xsd:documentation>

        The java-identifierType defines a Java identifier.
        The users of this type should further verify that 
        the content does not contain Java reserved keywords.
        
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:restriction base="javaee:string">
        <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
      </xsd:restriction>
    </xsd:simpleContent>
  </xsd:complexType>
```

[ Full content available at: 
https://github.com/apache/incubator-dubbo/pull/2470 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to