Project

General

Profile

1
for \$x in (
2
	collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType'),
3
	collection('/db/DRIVER/PendingRepositoryResources/RepositoryServiceResourceType')
4
)
5
where $cond$
6

    
7
return
8
	<ds>
9
		<dsId>{\$x//RESOURCE_IDENTIFIER/@value/string()}</dsId>
10
		<country>{\$x//COUNTRY/text()}</country>
11
		<name>{\$x//OFFICIAL_NAME/text()}</name>
12
		<size>{\$x//NUMBER_OF_OBJECTS/text()}</size>
13
		<valid>{\$x//RESOURCE_KIND/@value = 'RepositoryServiceResources'}</valid>
14
		<prefix>{\$x//FIELD[./key="NamespacePrefix"]/value/text()}</prefix>
15
		{
16
	    	for \$y in \$x//INTERFACE return
17
				<ifc>
18
					<ifcId>{\$y/@id/string()}</ifcId>
19
					<compliance>{
20
						if (\$y/INTERFACE_EXTRA_FIELD[@name='overriding_compliance']) then
21
							\$y/INTERFACE_EXTRA_FIELD[@name='overriding_compliance']/text()
22
						else
23
							\$y/@compliance/string()
24
					}</compliance>
25
					<active>{\$y/@active/string()}</active>
26
				</ifc>
27
		}
28
	</ds>
(2-2/3)