Skip to Content.
Sympa Menu

perfsonar-dev - restriction on XQuery syntax in LS?

Subject: perfsonar development work

List archive

restriction on XQuery syntax in LS?


Chronological Thread 
  • From: Nina Jeliazkova <>
  • To: "" <>
  • Subject: restriction on XQuery syntax in LS?
  • Date: Mon, 26 May 2008 15:41:57 +0300

Hello all,

Are there restrictions on XQuery statements, that are being submitted to LS ?  I've just found out that submitting the following XQuery to PIONIER LS returns an error. This is a valid XQuery, successfully tested locally with saxon9.


<?xml version='1.0' encoding='UTF-8'?>

<nmwg:message
  type="LSQueryRequest"
  id="msg1"
  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"
  xmlns:xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/">
                                                                                                                       
  <nmwg:metadata id="meta1">

    <xquery:subject id="sub1">
      declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";
      declare namespace perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
      declare namespace psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
      declare namespace xquery="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/lookup/xquery/1.0/";
       
    for $y in /nmwg:store/nmwg:metadata return
<tag>
{
$y/perfsonar:subject/psservice:service
}
</tag>



    </xquery:subject>
    <nmwg:eventType>service.lookup.xquery</nmwg:eventType>

  </nmwg:metadata>

  <nmwg:data metadataIdRef="meta1"/>

</nmwg:message>


The error message is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<nmwg:message id="msg1_resp" messageIdRef="msg1" type="LSQueryResponse" xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
  <nmwg:metadata id="resultCodeMetadata">
    <nmwg:eventType>warning.common.no_metadata</nmwg:eventType>
  </nmwg:metadata>
  <nmwg:data id="resultDescriptionData_for_resultCodeMetadata" metadataIdRef="resultCodeMetadata">
    <nmwgr:datum xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/">No output metadata was returned by MessageHandler. Maybe there was no data trigger, or data trigger  didn't have valid metadataIdRef? </nmwgr:datum>
  </nmwg:data>
</nmwg:message>
It seems the tags within the query mess the things up. However, it is a valid XQuery by itself ... and I was hoping to apply few relatively complex queries to extract all the necessary info in one go.

Best regards,
Nina




Archive powered by MHonArc 2.6.16.

Top of Page