After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339121 - XML Schema validation: facet pattern \(.*\)
XML Schema validation: facet pattern \(.*\)
Status: RESOLVED DUPLICATE of bug 327167
Product: libxml2
Classification: Platform
Component: general
2.6.x
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-20 07:34 UTC by Ulrich Homann
Modified: 2006-04-20 09:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ulrich Homann 2006-04-20 07:34:37 UTC
Please describe the problem:
A libxml2 2.6.23 compiled under solaris 5.9 has some difficulties with a 
pattern which contains "\(.*\)":

[facet 'pattern'] The value '(a)' is not accepted by the pattern '\(.*\)'.

Steps to reproduce:
1. test.xsd:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:simpleType name="rootType">
		<xs:restriction base="xs:string">
			<xs:pattern value="\(.*\)"/>
		</xs:restriction>		
	</xs:simpleType>

	<xs:element name="root" type="rootType" />
</xs:schema>

2. test.xml:
<?xml version="1.0"?>
<root>(a)</root>
 
3. xmllint --schema test.xsd test.xml 


Actual results:
<?xml version="1.0"?>
<root>(a)</root>
test.xml:2: element root: Schemas validity error : Element 'root': 
[facet 'pattern'] The value '(a)' is not accepted by the pattern '\(.*\)'.
test.xml:2: element root: Schemas validity error : Element 'root': '(a)' is not 
a valid value of the atomic type 'rootType'.
test.xml fails to validate


Expected results:
<?xml version="1.0"?>
<root>(a)</root>
test.xml validates


Does this happen every time?
Yes

Other information:
Comment 1 Ulrich Homann 2006-04-20 07:59:06 UTC
'.*X' is not equivalent to '[^\n\r]*X':
The value 'aX' is not accepted by the pattern '.*X'.
Comment 2 kbuchcik 2006-04-20 09:37:39 UTC
This bug was already fixed (see bug 327167). The fix is currently only in CVS and will be released with Libxml2 2.6.24.
Comment 3 kbuchcik 2006-04-20 09:38:44 UTC

*** This bug has been marked as a duplicate of 327167 ***