W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[XPath] Schema Element Test

From: <a.ohtake@itg.hitachi.co.jp>
Date: Fri, 8 Jul 2005 14:15:36 +0900
Message-ID: <XNM1$7$0$3$$2$8$1$A$2007581U42ce0be0@itg.hitachi.co.jp>
To: <public-qt-comments@w3.org>

I'm Atsushi Ohtake from Hitachi, Ltd. in Japan.
I have a question about Schema Element Test of XPath2.0 specification.

Is below case an "Schema Element Test" error or not ?

The base schema.
<element name="item" type="anyType" abstract="true">

The exended schema from base. "xbrli" is namesapce prefix for item in base.
<element name="myNillableElement" substitutionGroup="xbrli:item" nillable="true">

and candidate node is 
<myNillableElement xsi:nil="true" />

And a function( use namespace prefix is xfi ) is
xfi:somefunction($item as schema-element(xbrli:item)) as element(xbrli:item)

My issue point is below.
The function of xfi:somefunction only knows the element declaration "xbrli:item" as argument.
This element declaration "xbrli:item" has a default value of nillable="false".
So, XPath Processor test the consistensy between "xbrli:item" and "myNillableElement" of actually candidate node ,acording to Schema Element Test.

So, this is the point.
If the declaration of somefunction's argument may be different,
xfi:somefunction($item as schema-element(my:myNillableElement)) as element(xbrli:item)
This case is good by testing the consistensy between "my:myNillableElement" and "myNillableElement".
("my" is namespace prefix for myNillableElement)

But, we need to declare the argument "$item as schema-element(xbrli:item)" for general use.
Does we need to change declaration of "xbrli:item" in  the base schema?
Is my understanding of " Schema Element Test" missread ?

Atsushi Ohtake
Hitachi, Ltd.
Received on Friday, 8 July 2005 08:34:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC