Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
751 B
1
Indexable
Never
let $channel := 
                        for $ch in $sr/sr/channels/channel
                        where $ch/name = "P2"
                        return $ch

                    let $programs := 
                        for $p in $sr/sr/programs/program
                        where $p/channel = $channel/@id
                        return $p

                    let $editors :=
                        distinct-values($programs/editor)

                    let $categories :=
                        for $p in $programs
                        where $p/editor = $editors
                        return concat($p/editor,$p/category)

                    let $test := distinct-values($categories)

                    return $test