perfsonar-dev - Re: [pS-dev] restriction on XQuery syntax in LS?
Subject: perfsonar development work
List archive
- From: Maciej Glowiak <>
- To: Nina Jeliazkova <>
- Cc: "" <>, Nicolas Simar <>
- Subject: Re: [pS-dev] restriction on XQuery syntax in LS?
- Date: Mon, 26 May 2008 16:47:10 +0200
Nina,
The solution may be for example:
----------------------------------------------------------------
declare namespace nmwg="http://ggf.org/ns/nmwg/base/2.0/";
declare namespace nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
declare namespace
netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";
declare namespace
errors="http://ggf.org/ns/nmwg/characteristic/errors/2.0/";
declare namespace
discards="http://ggf.org/ns/nmwg/characteristic/discards/2.0/";
declare namespace
psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/";
declare namespace
perfsonar="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
declare namespace
psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/";
for $m in
/nmwg:store[@type='LSStore']/nmwg:metadata
let $service:=$m/perfsonar:subject/psservice:service
let $metaid:=data($m/@id)
let $eventtypes:=/nmwg:store[@type='LSStore']/nmwg:data[@metadataIdRef=$m/@id]//nmwg:eventType
return
<psui:lookupInformation>
<psui:serviceInfo>
{$service}
</psui:serviceInfo>
<psui:eventTypes>
{$eventtypes}
</psui:eventTypes>
</psui:lookupInformation>
----------------------------------------------------------------
The response should be formatted like:
----------------------------------------------------------------
<psui:lookupInformation
xmlns:psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/">
<psui:serviceInfo>
<!-- here comes psservice:service -->
</psui:serviceInfo>
<psui:eventTypes>
<!-- here come all related eventTypes -->
</psui:eventTypes>
</psui:lookupInformation>
----------------------------------------------------------------
so for example:
----------------------------------------------------------------
<psui:lookupInformation xmlns:psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/">
<psui:serviceInfo>
<psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.676af15e:119e688536f:2cc5">
<psservice:serviceName>perfSONAR PIONIER RRD MA</psservice:serviceName>
<psservice:accessPoint>meta1</psservice:accessPoint>
<psservice:serviceType>ma</psservice:serviceType>
<psservice:serviceDescription>perfSONAR PIONIER RRD MA</psservice:serviceDescription>
<psservice:serviceVersion>3.0</psservice:serviceVersion>
<psservice:organization>PIONIER</psservice:organization>
<psservice:contactEmail></psservice:contactEmail>
</psservice:service>
</psui:serviceInfo>
<psui:eventTypes>
<nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">http://ggf.org/ns/nmwg/characteristic/utilization/2.0/CCC</nmwg:eventType>
<nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">http://ggf.org/ns/nmwg/characteristic/utilization/2.0/BBB</nmwg:eventType>
<nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">http://ggf.org/ns/nmwg/characteristic/utilization/2.0/AAA</nmwg:eventType>
</psui:eventTypes>
</psui:lookupInformation>
<psui:lookupInformation xmlns:psui="http://ggf.org/ns/nmwg/tools/org/perfsonar-ui/1.0/">
<psui:serviceInfo>
<psservice:service xmlns:psservice="http://ggf.org/ns/nmwg/tools/org/perfsonar/service/1.0/" id="localhost.676af15e:119e688536f:2cc5">
<psservice:serviceName>perfSONAR PIONIER RRD MA</psservice:serviceName>
<psservice:accessPoint>meta2</psservice:accessPoint>
<psservice:serviceType>ma</psservice:serviceType>
<psservice:serviceDescription>perfSONAR PIONIER RRD MA</psservice:serviceDescription>
<psservice:serviceVersion>3.0</psservice:serviceVersion>
<psservice:organization>PIONIER</psservice:organization>
<psservice:contactEmail></psservice:contactEmail>
</psservice:service>
</psui:serviceInfo>
<psui:eventTypes>
<nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">eventType A</nmwg:eventType>
<nmwg:eventType xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">eventType B</nmwg:eventType>
</psui:eventTypes>
</psui:lookupInformation>
----------------------------------------------------------------
Of course that's only the example. You shoudl change psui namespace to your own, handled by PerfSONAR UI. Format may be of course different as well.
Best,
Maciej
- restriction on XQuery syntax in LS?, Nina Jeliazkova, 05/26/2008
- Re: [pS-dev] restriction on XQuery syntax in LS?, Maciej Glowiak, 05/26/2008
- Re: [pS-dev] restriction on XQuery syntax in LS?, Maciej Glowiak, 05/26/2008
Archive powered by MHonArc 2.6.16.