W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2004

querying XML document with schema

From: gayathri veerarajan <gaytri_v@yahoo.co.in>
Date: Tue, 11 May 2004 11:28:01 +0100 (BST)
Message-ID: <20040511102801.48677.qmail@web8202.mail.in.yahoo.com>
To: xmlschema-dev@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:44 GMT