[XPath] 2.5.4.4 Schema Element Test

Hello.

I'm Atsushi Ohtake from Hitachi, Ltd. in Japan.
I have a question about 2.5.4.4 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 2.5.4.4 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?
Or
Is my understanding of "2.5.4.4 Schema Element Test" missread ?

Regards,
Atsushi Ohtake
Hitachi, Ltd.

Received on Friday, 8 July 2005 08:34:11 UTC