let $all := input()/files
for $name in distinct-values($all/file/name/text()),
$owner in ($all/file/owner),
$size in ($all/file/size),
$cTime in ($all/file/creationTime),
$lTime in ($all/file/lastAcceessTime),
$path in ($all/file/path)
return (count($all[file/name=$name]), $owner, $name, $size, $cTime, $lTime, $path)
the errormessage is:
A runtime exception occurred. See the details for the trace.
i don’t find any description for xplxpe0021 even in the internet nor in taminodescription.
any idea where the fault is?
let $all := input()/files
for $chek in ($all/file)
let $name := distinct-values($chek/name)
let $owner := $chek/owner
let $size := $chek/size
let $cTime := $chek/creationTime
let $lTime := $chek/lastAccessTime
let $path := $chek/path
let $pDir := $chek/parentDirectory
let $dir := $chek/directory
let $pathSize := if ($pDir = 'keine Angabe') then (string-length($chek/directory)) else (string-length($chek/path))
where ($owner = 'rwa')
order by $pathSize ascending
now other question.
is there any possibility to programm an string-variable and to increase this variable?
[in code previously with “–>”]
--> declare variable $space as xs:string := " ";
...{
let $all := input()/files
for $chek in ($all/file)
let $name := distinct-values($chek/name)
let $owner := $chek/owner
let $size := $chek/size
let $cTime := $chek/creationTime
let $lTime := $chek/lastAccessTime
let $path := $chek/path
let $pDir := $chek/parentDirectory
let $dir := $chek/directory
let $pathSize := if ($pDir = 'keine Angabe') then (string-length($chek/directory)) else (string-length($chek/path))
where ($owner = 'rwa')
order by $pathSize ascending
return
<tr>
...
<td>{data($owner)}</td>
{
if (string-length($chek/rootDirectory) = string-length($chek/directory))
--> then (<td>{$space, data($name)}</td>)
else (<td>{data($name)}</td>)
--> (: increase the variable space with two spaces :)
--> $space = $space + " "
}
...
or doing with a for-loop:
--> declare variable $space as xs:integer := 0;
...{
let $all := input()/files
for $chek in ($all/file)
let $name := distinct-values($chek/name)
let $owner := $chek/owner
let $size := $chek/size
let $cTime := $chek/creationTime
let $lTime := $chek/lastAccessTime
let $path := $chek/path
let $pDir := $chek/parentDirectory
let $dir := $chek/directory
let $pathSize := if ($pDir = 'keine Angabe') then (string-length($chek/directory)) else (string-length($chek/path))
where ($owner = 'rwa')
order by $pathSize ascending
return
<tr>
...
<td>{data($owner)}</td>
{
--> for (i=0, i<space> {
--> $empty = ?insert i * spaces?
--> }
if (string-length($chek/rootDirectory) = string-length($chek/directory))
--> then (<td>{$space, data($name)}</td>)
else (<td>{data($name)}</td>)
(: increase the variable space with two spaces :)
--> $space +=2;
}
...