Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSV 2.10 IDC-XPath problem when using "child::"

From: Kasimier Buchcik <K.Buchcik@---------.-->
To: ML-xml-schema-dev <xmlschema-dev@--.--->
Date: 10/19/2005 6:28:00 PM
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 &lt;lambda>
  File ".\XSV\util\xpath.py", line 22, in &lt;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

From K.Buchcik@4... Wed Oct 19 14:55:06 2005
Received: from lisa.w3.org ([128.30.52.41])
	by frink.w3.org with esmtp (Exim 4.50


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent