18 lines
850 B
Plaintext
18 lines
850 B
Plaintext
|
|
||
|
|
||
|
for $profiles in collection('/db/Profiles/Service')//Resource
|
||
|
let $scopes := string-join( $profiles/Scopes//Scope/text(), ';')
|
||
|
let $subtype := $profiles//Resource/Profile/Class/text()
|
||
|
<RES_SUBTYPE ISdefault =''/>
|
||
|
return
|
||
|
<Resource>
|
||
|
{$profiles//Resource/ID}
|
||
|
<Type>{$profiles//Resource/Type/text()}</Type>
|
||
|
<SubType>{$subtype}</SubType>
|
||
|
<Scopes>{$scopes}</Scopes>
|
||
|
<ServiceClass>{$profiles//Resource/Profile/Class/text()}</ServiceClass>
|
||
|
<ServiceName>{$profiles//Resource/Profile/Name/text()}</ServiceName>
|
||
|
<!-- if many software defined takes the version of the first one -->
|
||
|
<Version>{$profiles//Resource/Profile/Packages/Software[1]/Version/text()}</Version>
|
||
|
<Shareable>{$profiles//Resource/Profile/Packages/Software/Shareable/string(@level)}</Shareable>
|
||
|
</Resource>
|