Comments inline.
Raymond Feng wrote:
Hi,
I spent more time reviewing the XQuery implementation type. I think
it's a great addition to our XML story. Let me share some of the
questions and suggestions I have so far.
1) The <implementation.xquery> model
The current code only supports: <implementation.xquery
location="location_of_the_xquery_script"/>. It requires that we locate
and load a file which is not very consistent with other extensions (we
use QNames to identify artifacts).
I suggest that we use the QName of the XQuery function instead of the
location.
+1 to make it more consistent with the other XML patterns in SCA. This
will also allow people to package their XQueries in other SCA
contributions and import them with SCA <import> statements.
For the following XQuery function,
declare namespace quoteJoin="scaservice:java/xquery.quote.QuoteJoin";
declare function quoteJoin:joinPriceAndAvailQuotes($priceQuoteDoc,
$availQuoteDoc, $taxRate)
I assume the QName will be:
{scaservice:java/xquery.quote.QuoteJoin}joinPriceAndAvailQuotes
<implementation.xquery xmlns:f="<function_ns_uri>"
function="f:<function_name>"/>
Do we also want to support the inline XQuery such as
<implementation.xquery script="<the_text_of_xquery_script>"?
Not sure about the value of this, as:
- It won't allow you to edit the XQuery using any kind of XQuery tool,
as it won't like the SCA composite elements around the XQuery
- It will start to pollute the composite, which is mostly about
assembly, with implementation details
- it will force the application developer to duplicate the whole text of
the XQuery into each component/implementation element.
2) How to map the SCA services/references/properties to XQuery?
We currently use the namespace in XQuery to define SCA
services/references/properties as follows:
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 taxRate="scaproperty:java/java.lang.Float";
declare variable $quoteCalculator external;
declare variable $priceQuoteDoc external;
declare variable $availQuoteDoc external;
declare variable $taxRate external;
I suggest that we refine the naming convention of the namespaces.
What would people like to propose. It would nice if we could leave
namespaces out of this and just use simple names...
The e-mail is getting lengthy. I'll post more questions/suggestions as
we go.
Thanks,
Raymond
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]