diff options
Diffstat (limited to 'branches/sca-java-0.99/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq')
-rw-r--r-- | branches/sca-java-0.99/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/branches/sca-java-0.99/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq b/branches/sca-java-0.99/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq deleted file mode 100644 index 62275b41f8..0000000000 --- a/branches/sca-java-0.99/samples/quote-xquery/src/main/resources/META-INF/sca/quote_join_properties.xq +++ /dev/null @@ -1,48 +0,0 @@ -declare namespace quoteJoin="scaservice:java/xquery.quote.PropertiesQuoteJoin"; - -declare namespace quoteCalculator="scareference:java/xquery.quote.QuoteCalculator"; - -declare namespace priceQuoteDoc="scaproperty:xml/http://www.example.org/price:priceQuote"; -declare namespace availQuoteDoc="scaproperty:xml/http://www.example.org/avail:availQuote"; -declare namespace taxRate="scaproperty:java/java.lang.Float"; - -declare variable $quoteCalculator external; - -declare variable $priceQuoteDoc external; -declare variable $availQuoteDoc external; -declare variable $taxRate external; - -declare function quoteJoin:joinPriceAndAvailQuotes() { -<quote> - <name>{ data($priceQuoteDoc/priceQuote/customerName) }</name> - <address>{ concat($priceQuoteDoc/priceQuote/shipAddress/@street , ",", $priceQuoteDoc/priceQuote/shipAddress/@city ,",", fn:upper-case($priceQuoteDoc/priceQuote/shipAddress/@state) , ",", $priceQuoteDoc/priceQuote/shipAddress/@zip) }</address> - { - for $priceRequest in $priceQuoteDoc/priceQuote/priceRequests/priceRequest, - $availRequest in $availQuoteDoc/availQuote/availRequest - where data($priceRequest/widgetId) = data($availRequest/widgetId) - return - <quoteResponse> - <widgetId>{ data($priceRequest/widgetId) }</widgetId> - <unitPrice>{ data($priceRequest/price) }</unitPrice> - <requestedQuantity>{ data($availRequest/requestedQuantity) }</requestedQuantity> - <fillOrder>{ data($availRequest/quantityAvail) }</fillOrder> - { - for $shipDate in $availRequest/shipDate - return - <shipDate>{ data($shipDate) }</shipDate> - } - <taxRate>{ $taxRate }</taxRate> - <totalCost>{ quoteCalculator:calculateTotalPrice( - $quoteCalculator, - - $taxRate, - - $availRequest/requestedQuantity, - - $priceRequest/price, - - $availRequest/quantityAvail) }</totalCost> - </quoteResponse> - } - </quote> -};
\ No newline at end of file |