2012-12-28 17:45:48 +01:00
<!--
RES_SUBTYPE subtype parameters can be passed by expressing:
where $subtype = "TheSubType" and $wsresource/Data//child::*[local-name()='Type'][0]/string() eq 'gDocRead'
-->
2013-05-07 15:33:13 +02:00
for $profiles in collection('/db/Profiles/GenericResource')//Resource, $wsresource in collection('/db/Properties')//Document
2012-12-28 17:45:48 +01:00
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
let $subtype := $profiles//Resource/Profile/SecondaryType/text()
2013-05-07 15:33:13 +02:00
where $subtype = "DataSource" and $profiles//Resource/ID eq $wsresource/SourceKey and $wsresource/Data//child::*[local-name()='ServiceName']/string() eq 'tree-manager-service'
2012-12-28 17:45:48 +01:00
<RES_SUBTYPE ISdefault =''/>
return
<Resource>
{$profiles//Resource/ID}
<Type>{$profiles//Resource/Type/text()}</Type>
<SubType>{$subtype}</SubType>
<Scopes>{$scopes}</Scopes>
<Name>{$profiles//Resource/Profile/Name/text()}</Name>
2013-05-07 15:33:13 +02:00
<CreationTime>{$profiles//Resource/Profile/Body/SourceProperties/creationTime/text()}</CreationTime>
<UserCollection>{$profiles//Resource/Profile/Body/SourceProperties/user/text()}</UserCollection>
2012-12-28 17:45:48 +01:00
<LastUpdateTime>{$wsresource/LastUpdateHuman/text()}</LastUpdateTime>
<NumberOfMembers>{$wsresource//child::*[local-name()='Cardinality']/text()}</NumberOfMembers>
2013-05-07 15:33:13 +02:00
</Resource>