- From: Kasimier Buchcik <K.Buchcik@4commerce.de>
- Date: Wed, 19 Oct 2005 16:28:13 +0200
- To: ML-xml-schema-dev <xmlschema-dev@w3.org>
Hi, An XSV 2.10 crash; probably due to the "child::" in the <xsd:selector xpath="child::foo:item"/>. It works fine if I change the XPath expression to "foo:item". XSV's Error report: <xsv xmlns="http://www.w3.org/2000/05/xsv" docElt="{urn:test:foo}foo" instanceAssessed="false" schemaErrors="0" schemaLocs="urn:test:foo -> idc-xpath-1.xsd" target="file:///p:/libxml2-lab/tests/2005-10-19/idc-xpath-1.xml" version="XSV 2.10-1 of 2005/04/22 13:10:49"> <schemaDocAttempt URI="file:///p:/libxml2-lab/tests/2005-10-19/idc-xpath-1.xsd" namespace="urn:test:foo" outcome="failure" source="schemaLoc"/> <bug>validator crash during schemaLoc: Traceback (most recent call last): File ".\XSV\compile\SSchema.py", line 647, in checkinSchema File ".\XSV\compile\SSchema.py", line 377, in fromFile File ".\XSV\infoset\relNorm\rebuild.py", line 281, in fromFile File ".\XSV\infoset\relNorm\rebuild.py", line 365, in processElement File ".\XSV\infoset\relNorm\rebuild.py", line 365, in processElement File ".\XSV\infoset\relNorm\rebuild.py", line 403, in processElement File ".\XSV\compile\elts\idElts.py", line 11, in init File ".\XSV\compile\KCons.py", line 22, in __init__ File ".\XSV\util\xpath.py", line 17, in __init__ File ".\XSV\util\xpath.py", line 24, in parse File ".\XSV\util\xpath.py", line 23, in <lambda> File ".\XSV\util\xpath.py", line 22, in <lambda> File ".\XSV\util\xpath.py", line 44, in patBit KeyError: u'child' </bug> </xsv> The scenario: idc-xpath-1.xsd --------------- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test:foo" xmlns:foo="urn:test:foo"> <xsd:element name="item"> <xsd:complexType> <xsd:sequence> <xsd:element ref="foo:item" minOccurs="0" maxOccurs="5"/> </xsd:sequence> <xsd:attribute name="val" type="xsd:string"/> </xsd:complexType> </xsd:element> <xsd:element name="foo"> <xsd:complexType> <xsd:sequence> <xsd:element ref="foo:item"/> </xsd:sequence> </xsd:complexType> <xsd:unique name="ukey"> <!-- "./ /." "child ::imp:iid" --> <xsd:selector xpath="child::foo:item"/> <xsd:field xpath="@val"/> </xsd:unique> </xsd:element> </xsd:schema> idc-xpath-1.xml --------------- <foo xmlns="urn:test:foo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:test:foo idc-xpath-1.xsd"> <item val="1"> <item val="2"> <item val="3"/> </item> <item val="4"/> </item> </foo> Regards, Kasimier
Received on Wednesday, 19 October 2005 14:28:18 UTC