Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error range for cvc-pattern-valid #477

Closed
angelozerr opened this issue Jun 28, 2019 · 0 comments · Fixed by #486
Closed

Fixed error range for cvc-pattern-valid #477

angelozerr opened this issue Jun 28, 2019 · 0 comments · Fixed by #486
Assignees
Labels
bug Something isn't working validation XSD
Milestone

Comments

@angelozerr
Copy link
Contributor

angelozerr commented Jun 28, 2019

Take the pattern.xsd XML Schema file:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified" attributeFormDefault="unqualified">

	<xs:element name="Annotation">
		<xs:complexType>
			<xs:attribute name="Term" type="TQualifiedName"
				use="required" />
		</xs:complexType>
	</xs:element>


	<xs:simpleType name="TQualifiedName">
		<xs:restriction base="xs:NCName">
			<xs:pattern
				value="[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}(\.[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}){1,}" />
		</xs:restriction>
	</xs:simpleType>

</xs:schema>

The XML file bound to this XML pattern.xsd:

<Annotation
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="pattern.xsd"
	Term="X"
	>
</Annotation>

should highlight "X" as error.

@angelozerr angelozerr added this to the v0.8.0 milestone Jun 28, 2019
@angelozerr angelozerr added bug Something isn't working XSD labels Jul 23, 2019
@angelozerr angelozerr changed the title Error range for cvc-pattern-valid Error range for cvc-pattern-valid Jul 23, 2019
@angelozerr angelozerr changed the title Error range for cvc-pattern-valid Fixed error range for cvc-pattern-valid Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working validation XSD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants