Rev | Line | |
---|
[483] | 1 | declare variable $my:entityName as xs:string external; |
---|
| 2 | |
---|
| 3 | declare variable $databaseURI := concat('jdbc://getCreditDefaultSwapsByEntityName?cd%&', $my:entityName); |
---|
| 4 | declare variable $creditDefaultSwaps := collection($databaseURI); |
---|
| 5 | |
---|
| 6 | declare function local:equityRows($root) { |
---|
| 7 | for $equity in $root//equity |
---|
| 8 | let $referenceEntity := $creditDefaultSwaps//fpml:referenceEntity |
---|
| 9 | where $equity/name = $referenceEntity/fpml:entityName |
---|
| 10 | return |
---|
| 11 | <tr xmlns="http://www.w3.org/1999/xhtml"> |
---|
| 12 | <td>{ $equity/*:symbol/text() }</td> |
---|
| 13 | <td>{ $equity/*:name/text() }</td> |
---|
| 14 | <td>{ $equity/*:high/text() }</td> |
---|
| 15 | <td>{ $equity/*:currency/text() }</td> |
---|
| 16 | </tr> |
---|
| 17 | }; |
---|
| 18 | |
---|
| 19 | <table border="1"> |
---|
| 20 | <tr> |
---|
| 21 | <th>Ticker Symbol</th> |
---|
| 22 | <th>Company Name</th> |
---|
| 23 | <th>High</th> |
---|
| 24 | <th>Currency</th> |
---|
| 25 | </tr> |
---|
| 26 | { local:equityRows(/) } |
---|
| 27 | </table> |
---|
Note: See
TracBrowser
for help on using the repository browser.