querying XML document with schema

I have wriiten a xml schema file  which contains a substitution group. hence I have two xml documents which uses the substitution members interchangeably.
<?xm version="1.0" ?> 
- <camera:PurchaseableItem xmlns:camera="http://www.xfront.com/owl/ontologies/camera/#">
-    <camera:Lens>
-          <Instance>
              <camera:size>"10"</camera:size> 

              <camera:aperture>"20"</camera:aperture> 

    </Instance>


  </camera:Lens>
 </camera:PurchaseableItem>




 
<?xm version="1.0" ?> 
- <camera:PurchaseableItem xmlns:camera="http://www.xfront.com/owl/ontologies/camera/#">
-     <camera:Lens>
-         <Instance>
              <camera:focal-length>"10"</camera:focal-length> 

        <camera:f-stop>"20"</camera:f-stop> 

    </Instance>


  </camera:Lens>
 </camera:PurchaseableItem>
 
I wrote a small query in GALAX to retrieve the values of focal length in these two documents  and it gave me an error saying 
" Internal Error: Invalid schema: complexcontent element is found "
 
This error occurs even if I query just one document as follows

import schema namespace camera = "cameraFun.xsd"

<PurchaseableItems>{

for $a in document("cameraTest.xml")/camera:PurchaseableItem/camera:Lens/Instance/camera:size

return

<cameraSize>{ $a/text()} </cameraSize> }

</PurchaseableItems>

I have validated the xsd and xml files using XSV , Im sure there is no problem with the files.

I think Galax accepts only  simple xsd files without derived types.  

Is there any other query engine for this purpose.

 With Regards ,

V.Gayathri.






Yahoo! India Matrimony: Find your partner online.

Received on Tuesday, 11 May 2004 06:29:44 UTC