Documentation for XQuery Functions?
I have been looking for more information on the Aqualogic specific XQuery functions but have so far come up short. In particular I want to know the details for fn-bea:uuid(). I would like to be able to generate a unique identifier to use for correlating messages that come through ALSB in my log. Is there somewhere that I can find a description of what this function does?
WaltK wrote:
Where do I find documentation for APEX provided javascript functions such as addRow();?
addRow is undocumented.
Documented JavaScript methods are described in the API Reference, other documentation for the current version is located on the APEX Documentation page. Documentation for previous versions is located in the documentation archive.
Similar Messages
-
Documentation for SAP function modules??
Hello,
is there any documentation for the SAP function modules available?
I need documentation for SJ01 (SAP Objects). If I try to view the documentation in SE80, I get the error message: "Document OJ_XXX(whatever I selected) is not available in language DE"
Where can I get this documentation?
Is there an overview+documentation available somewhere of all SAP functions which may be used for own programs? Or how do I know what's already available and how to use it?
Thanks
SteffiHi,
Go thru this links
http://sap.ittoolbox.com/topics/t.asp?t=303&p=449&h2=322&h1=303&h3=449
http://www.erpgenie.com/abap/functions.htm
Thanks
Sunil -
Documentation for Javascript Functions
Where do I find documentation for APEX provided javascript functions such as addRow();?
WaltK wrote:
Where do I find documentation for APEX provided javascript functions such as addRow();?
addRow is undocumented.
Documented JavaScript methods are described in the API Reference, other documentation for the current version is located on the APEX Documentation page. Documentation for previous versions is located in the documentation archive. -
Hi Folks,
Sprinkled throughout lots of the documentation there is a reference to the "v()" function.
Examples include "v('APP_USER')" and similar.
Since this function doesn't appear to be part of a PL/SQL package, using it perturbs me slightly: I always
like to have at least some sort of grasp of what I'm using and although I am grateful for all the folk that
show examples of its use, there's nothing like having the fundamental definition to make a Developer sleep
a little easier at night... :-)
Can any kind soul give a URL for the place in the documentation where it describes this mysterious function
please?
Thanks in advance
MungoThanks to (currently) the two respondents. Though I didn't state it, it was the API documentation that I
was seeking, hence I marked "jarola" as Correct. The other respondent was most helpful too.
Follow-on question: if I use "v(...)" in a database table trigger, that trigger runs in the database and (I think) only has
access to the schema's code as well as the usual built-ins.
Since this function belongs to Apex, how is it "attached" to my schema? When I specify a schema to be linked to a Workspace,
is this where the linking occurs?
Hoping you can see my question through the fog of feeble words I've used; thanks in advance.
Mungo -
Replacement for a function module in 6.0
Hi
I am in the process of upgrading from 4.7 to 6.0 . The function module SAPWL_STATREC_READ_FILE is flagged as obsolete . Am unable to find a documentation for this function module . So which is the replacement for this function module . ?
Please help . .hi,
the replacement is SAPWL_STATREC_DIRECT_READ
next time check the source code of the FM, probably you'll find the answer...
hope this helps
ec -
Trouble creating Variant format for ActiveX Function (MintMT Controller)
Hello!
I am creating a VI to control 2-axis motion using the MintMT activeX library and have run into a problem. I was able to easily call and execute functions from Labview until I ran into one (VectorA) that requires an array of variant input. I cannot format my input correctly and have exhausted myself trying different combinations of building this array and converting to variant type (To Variant). I also have wired Labview arrays directly (with no luck). The arrays are very small (only 2 elements). Finally I tried the OpenG library (Cluster to Varray and Array to Array of Vdata) without success. The error code is: LabVIEW: (Hex 0x80070057) One or more arguments are invalid.
Any advice?
Attached is the documentation for the function:
VectorA
Prototype:
VB VectorA(nNumberOfAxes As Integer, nAxesArray As Variant,
fPosArray As Variant)
Delphi VectorA : (nNumberOfAxes: Smallint; nAxesArray: OleVariant;
fPosArray: OleVariant)
C++ void VectorA(short nNumberOfAxes, VARIANT nAxesArray, VARIANT fPosArray);
C void VectorA(__int16 nNumberOfAxes, __int16 *nAxesArray, float *fPosArray);Hi Mr. NiceGuy,
The code from the manufacturer has a To Variant converter between the arrays and the Property Node. I'd recommend converting the arrays to variants in your code. You can find that To Variant VI on the Functions Palette » Programming » Cluster, Class, & Variant »Variant. Let us know if that works.
Hillary
Regards,
Hillary E
National Instruments -
Hi,
Can someone please point me to the api documentation for XQuery.
The link for the javadocs (http://www.oracle.com/technology/sample_code/tech/xml/xmldb/xquery_javadoc/) as mentioned in this article - http://www.oracle.com/technology/sample_code/tech/xml/xmldb/jxqi.html is not correct.
Thanks in advance.
Malkit S. BhasinHi Christine,
I had the same problem a few days ago and opened a customer message in OSS. The official SAP answer is that you can only use what is documented (stuff like org.apache.* etc). Other packages are for SAP internal use only and I guess the doc is not public, so they're not supported and could be changed without any notice. So you still can use them, at your own risk.
Hope this helps.
Alex -
Where can I find documentation for the HSP* Custom Functions
I can see a number of HSP functions are registered in Essbase but cannot find any documentation for them. I am reluctant to use them for client development without some proper documentation. Does anyone know where it can be found?
The functions are :
@HspNthMbr
@HspNumToString
@HspDateToString
@HspConcat
@HspMbrIndex
@HspMessage
@HspGetMbrCount
@HspCreateCDFSession
@HspRemoveCDFSession
@HspAddPageCombination
@HspCreateEssbaseServerFile
@HspWritePageCombinations
@HspGetFileName
Many of these look interesting. Some of them seem obvious, others might have a number of paramenters and options.
Any help appreciated.
RichardHere is the contents of essfunc.xml. A little bit more information than what is available than in EAS; for example regarding function @HspGetMbrCount, it has a limited function prototype "@HspGetMbrCount(StringArray)" and purpose "Returns the member count of the range provided". I got this from Oracle/Middleware/user_projects/essbase1/EssbaseServer/essbaseserver1/java. You can view it more easily in Internet Explorer or vim.
<?xml version="1.0" encoding="utf-8" ?>
- <definitions version="6.2.0">
<macros />
- <functions>
- <function name="@HspNthMbr" tssec="1377715749" tsmcs="202567" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getNthMember(String[],int)">
- <spec>
- <![CDATA[ @HspNthMbr(memberRange, PosIndex)
]]>
</spec>
- <comment>
- <![CDATA[ Returns nth member in the range provided
]]>
</comment>
</function>
- <function name="@HspNumToString" tssec="1377715749" tsmcs="224917" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.numToString(int)">
- <spec>
- <![CDATA[ @HspNumToString(NumericInput)
]]>
</spec>
- <comment>
- <![CDATA[ Returns String type value for the numeric value provided
]]>
</comment>
</function>
- <function name="@HspDateToString" tssec="1377715749" tsmcs="246968" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.dateToString(int)">
- <spec>
- <![CDATA[ @HspDateToString(NumericDateInput)
]]>
</spec>
- <comment>
- <![CDATA[ Returns String type date in DD/MM/YYYY format
]]>
</comment>
</function>
- <function name="@HspConcat" tssec="1377715749" tsmcs="268969" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.makeAString(String[])">
- <spec>
- <![CDATA[ @HspConcat(StringArray)
]]>
</spec>
- <comment>
- <![CDATA[ Returns a single string by concatenating all the values passed to it
]]>
</comment>
</function>
- <function name="@HspMbrIndex" tssec="1377715749" tsmcs="291290" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getMbrIndex(String[], String)">
- <spec>
- <![CDATA[ @HspGetMbrIndex(String[], String)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the member position in the dimension based on outline order.
]]>
</comment>
</function>
- <function name="@HspMessage" tssec="1377715749" tsmcs="315045" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getURL(String[])">
- <spec>
- <![CDATA[ @HspMessage(StringArray)
]]>
</spec>
- <comment>
- <![CDATA[ Returns URL format of the message and parameters
]]>
</comment>
</function>
- <function name="@HspGetMbrCount" tssec="1377715749" tsmcs="335521" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getMbrCount (String[])">
- <spec>
- <![CDATA[ @HspGetMbrCount(StringArray)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the member count of the range provided
]]>
</comment>
</function>
- <function name="@HspDateDiff" tssec="1377715749" tsmcs="357494" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.dateDiff(int,int)">
- <spec>
- <![CDATA[ @HspDateDiff(fromDate, toDate)
]]>
</spec>
- <comment>
- <![CDATA[ Returns difference between two dates in days, inclusive of dates passed.
]]>
</comment>
</function>
- <function name="@HspDateRoll" tssec="1377715749" tsmcs="379014" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.dateRoll(int,int,int)">
- <spec>
- <![CDATA[ @HspDateRoll(startDate, noOfPeriods, periodType)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the next date, resulting from adding noOfPeriods to StartDate.
]]>
</comment>
</function>
- <function name="@HspOffsetIdx" tssec="1377715749" tsmcs="400720" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getDataOffsetIdx(long[],long[],long[],int,int,int)">
- <spec>
- <![CDATA[ @HspOffsetIdx(DataList, StartDateList, EndDateList, BaseValue, OffSet, BaseDate)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the pointer to data which is nth distinct value, where n is the offset and for that data, gets relevant row based on date array.
]]>
</comment>
</function>
- <function name="@HspMbrList" tssec="1377715749" tsmcs="422891" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getMemberList(String[],long[],int)">
- <spec>
- <![CDATA[ @HspMbrList(MemberList, DataList, ChkValue)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the list of members, at positions corresponding to data same as ChkValue in DataList.
]]>
</comment>
</function>
- <function name="@HspNextAllocIdx" tssec="1377715749" tsmcs="445933" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getNextAllocIdx(long[],long[],int)">
- <spec>
- <![CDATA[ @HspNextAllocIdx(dataList,unspAcc,counter)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the pointer for the first row with no allocation or first row positive allocaction and not a modified row or total
]]>
</comment>
</function>
- <function name="@HspStringCompare" tssec="1377715749" tsmcs="469322" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.stringcompare(String, String)">
- <spec>
- <![CDATA[ @HspStringCompare(srcstring, trgtstr)
]]>
</spec>
- <comment>
- <![CDATA[ Does a string compare and Returns the true if sourcestring and target string are same.
]]>
</comment>
</function>
- <function name="@JDebug" tssec="1377715749" tsmcs="493564" javaSpec="com.hyperion.calcmgr.common.cdf.DebugFunctions.debug (int , String, String[], double , String)">
<flag value="RUNTIME" />
- <spec>
- <![CDATA[ @JDebug(action, returnAddr, str_array, dblInput, lineKey)
]]>
</spec>
</function>
- <function name="@JSendDebug" tssec="1377715749" tsmcs="521638" javaSpec="com.hyperion.calcmgr.common.cdf.DebugFunctions.sendDebug(int , String , String[] , double[] , String )">
<flag value="RUNTIME" />
- <spec>
- <![CDATA[ @JSendDebug(action, returnAddr, str_array,dblInput_array, lineKey)
]]>
</spec>
</function>
- <function name="@HspCreateCDFSession" tssec="1377715749" tsmcs="548082" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.createCDFSession()">
- <spec>
- <![CDATA[ @HspCreateCDFSession()
]]>
</spec>
- <comment>
- <![CDATA[ Creates and returns a unique session Id
]]>
</comment>
</function>
- <function name="@HspRemoveCDFSession" tssec="1377715749" tsmcs="578942" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.removeCDFSession(long)">
- <spec>
- <![CDATA[ @HspRemoveCDFSession(sessionId)
]]>
</spec>
- <comment>
- <![CDATA[ Removes the session with the provided sessionId
]]>
</comment>
</function>
- <function name="@HspAddPageCombination" tssec="1377715749" tsmcs="610001" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.addPageCombination(long, String[])">
- <spec>
- <![CDATA[ @HspAddPageCombination(sessionId, pages)
]]>
</spec>
- <comment>
- <![CDATA[ Adds a page combination
]]>
</comment>
</function>
- <function name="@HspCreateEssbaseServerFile" tssec="1377715749" tsmcs="640601" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.createEssbaseServerFile(long,String,String)">
- <spec>
- <![CDATA[ @HspCreateEssbaseServerFile(sessionId, appName, cubeName)
]]>
</spec>
- <comment>
- <![CDATA[ Creates a unique file on the Essbase server and returns the file path
]]>
</comment>
</function>
- <function name="@HspWritePageCombinations" tssec="1377715749" tsmcs="669640" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.writePageCombinations(long, String)">
- <spec>
- <![CDATA[ @HspWritePageCombinations(sessionId, fileName)
]]>
</spec>
- <comment>
- <![CDATA[ Writes all the page combinations with data to the file
]]>
</comment>
</function>
- <function name="@HspGetFileName" tssec="1377715749" tsmcs="705211" javaSpec="com.hyperion.essbase.cdf.psb.HSPCDFUtils.getFileName(String)">
- <spec>
- <![CDATA[ @HspGetFileName(filePath)
]]>
</spec>
- <comment>
- <![CDATA[ Returns the file name for the give path
]]>
</comment>
</function>
</functions>
</definitions> -
Documentation for declare cursor in table function
Thanks in advance to all,
Could anyone pont me to doc about declaring cursor for table function?
For example something as:
CURSOR cur_test IS
SELECT S.*, OT.par1
FROM table S, TABLE (pak.tabfunc(&par0,S.col1) ) OT'Cause having problem in compilation (ORA_904 invalid identifier)
ThanksThanks William for reply,
Is that part of the code? No, It was only for example.
my problem is:
I don't understand, I have success in SQL
begin
FOR x IN
(SELECT s.*, OT.*
FROM tablex S,
TABLE (pkg.myfunctpipilined(x1,x2,x3,s.col1) ) OT
WHERE ........
) LOOP
dbms_output.put_line('Fetching.... ' || x.xxxxx);
END LOOP;
END;but, when i insert that in a procedure I get ORA-904 identifier on pkg.myfunctpipilined
Thanks again for your time, I appreciated, I keep on to try and looking for
ps. pkg.myfunctpipilined is pipelined function in Package based on Table's Object -
Including customized xquery functions in XQuery/XSLT expression Editor-OSB
Hi,
I have written a customized xquery function. I want this to be included in the List of Xquery Functions which is displayed by Oracle Service Bus in the XQuery/XSLT
Expression Editor. OSB displays the built in xquery functions in the XSLT/Xquey Expression Editor. Is there any way to add the customised xquery to this list, so that it can be dragged and dropped later?
Thanks,
Balaji.I doubt if that is exposed out side of Oracle Engineering (Not public/documented). Please raise a support ticket for enhancement. If PM should concur you might get the steps that need to be performed for this feature.
Thanks
Manoj
Edited by: Manoj Neelapu on Jun 8, 2010 8:37 AM -
Retrieving Principal Name (=User Id) via XQuery Function
I'm using a custom identity asserter within my WLS to create the security context.
The OSB documentation states, that there is a XQuery function to read the user id from the security context: fn-bea:userid (see XQuery Implementation - 11g Release 1 (11.1.1.7)). Note: I have noticed that Oracle makes a distinction between Function Extensions from Oracle Service Bus and Supported Function Extensions from Oracle a.k.a Oracle’s XQuery Implementation).
When using this XPath function in my OSB installation I receive the following error: {bea-err}SYS001: This functionality has not been implemented (sorry) operator [QName {http://www.bea.com/xquery/xquery-functions}userid]
My questions:
- Is this the correct function to read the user id/user name/principal information from the security context?
- If it is, how can I make that function run in my OSB Domain? Is there a component I need to include/reference?
- If not, what other options do I have? What is best practice? (e.g. Java Callout & accessing the HttpServletRequest object via Java?)
Many thanks in advance.In OSB you can use fn-bea:lookupBasicCredentials($arg-string) function for the same.
Here is the referece: XQuery Implementation - 11g Release 1 (11.1.1.6.3) -
How to check for a function module with its description and functionality
Hi all,
How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .Hi,
You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
Say for example you need to search something regarding converstion.
Search for * CONVERT * and press F4.
If there is something specfic like converting date to something you can give
DATE * CONVERT *
OR
CONVERT * DATE * and press F4.
Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
Regards,
Pramod -
Examples for using function modules and BApis.
My Dear FRNDS,
I am very new to ABAP. And I have read the documentation for function modules but i am not that clear to practice them.So I would be very happy if u people share a little bit of ur experience with me.
Please provide me some examples of all the use cases in function modules and specially exception handling.
Frnds, i am going to work with bapis so i feel practicing function module will give me a edge.
and please tell me after calling a BAPI FM why we have to perform 'BAPI_TRANSACTION_COMMIT' and 'BAPI_TRANSACTION_ROLLBACK'.
.Ur efforts will be greatly rewarded.
thx,
reshaliHi,
Please check this sample codes.
DATA: BAPI_Z05DOGI_DELIVERY LIKE BAPIOBDLVHDRCON-DELIV_NUMB ,
BAPI_Z05DOGI_HEADER_DATA LIKE BAPIOBDLVHDRCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_HEADER_CONTROL LIKE BAPIOBDLVHDRCTRLCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_DATA LIKE BAPIOBDLVITEMCON OCCURS 0 WITH HEADER LINE,
BAPI_Z05DOGI_ITEM_CONTROL LIKE BAPIOBDLVITEMCTRLCON OCCURS 0 WITH HEADER LINE ,
BAPI_Z05DOGI_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE .
CLEAR: BAPI_Z05DOGI_DELIVERY , BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA ,BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
REFRESH: BAPI_Z05DOGI_HEADER_DATA , BAPI_Z05DOGI_HEADER_CONTROL , BAPI_Z05DOGI_ITEM_DATA , BAPI_Z05DOGI_ITEM_CONTROL , BAPI_Z05DOGI_RETURN .
BAPI_Z05DOGI_DELIVERY = ZMM_WB1-ISSUE .
BAPI_Z05DOGI_HEADER_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
APPEND BAPI_Z05DOGI_HEADER_DATA.
BAPI_Z05DOGI_HEADER_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_HEADER_CONTROL-POST_GI_FLG = 'X'.
APPEND BAPI_Z05DOGI_HEADER_CONTROL.
BAPI_Z05DOGI_ITEM_DATA-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_DATA-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-SALES_UNIT = XTAB-MEINS.
BAPI_Z05DOGI_ITEM_DATA-DLV_QTY_IMUNIT = LFIMGGIA.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_NOM = UMVKZLIPS.
BAPI_Z05DOGI_ITEM_DATA-FACT_UNIT_DENOM = UMVKNLIPS.
APPEND BAPI_Z05DOGI_ITEM_DATA.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_NUMB = ZMM_WB1-ISSUE.
BAPI_Z05DOGI_ITEM_CONTROL-DELIV_ITEM = 10.
BAPI_Z05DOGI_ITEM_CONTROL-CHG_DELQTY = 'X'.
APPEND BAPI_Z05DOGI_ITEM_CONTROL.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CONFIRM_DEC'
EXPORTING
DELIVERY = BAPI_Z05DOGI_DELIVERY
HEADER_DATA = BAPI_Z05DOGI_HEADER_DATA
HEADER_CONTROL = BAPI_Z05DOGI_HEADER_CONTROL
TABLES
ITEM_DATA = BAPI_Z05DOGI_ITEM_DATA
ITEM_CONTROL = BAPI_Z05DOGI_ITEM_CONTROL
RETURN = BAPI_Z05DOGI_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPI_Z05DOGI_RETURN.
Go thru this link
http://www.planetsap.com/LIST_ALL_BAPIs.htm
BAPI_TRANSACTION_COMMIT
Execute external Commit when using BAPIs
This method executes a COMMIT WORK command. It is required for
transactions developed externally to the R/3 System that change data in
the R/3 System via BAPI calls.
When you call BAPIs in your program that change data in the R/3 System,
afterwards you must call this method to write the changes to the
database.
COMMIT WORK
The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the currenta SAP LUW in the process
there are some FM that we use for creating trasaction . for example FM : that use for creating production order . if you execut the FM , the system will not create any data in the system so you need to excute the FM : BAPI_TRANSACTION_COMMIT to commit that creating the production order .
in case of commit work, that is a syntax in abap program . if you use this syntax after you insert ,update or delete table in the sap ,system will do it immediately otherwise the system will do it after execution is complete.
ROLLBACK WORK.
for confirming or undoing database updates. COMMIT WORK always concludes a database LUW and starts a new one. ROLLBACK WORK always undoes all changes back to the start of the database LUW.
Regards,
Raj. -
Trying to create a Histogram type/object for aggregate functions
Hi,
I am trying to create an aggregate function that will return a histogram
type.
It doesn't have to be an object that is returned, I don't mind returning
a string but I would like to keep the associative array (or something
else indexed by varchar2) as a static variable between iterations.
I started out with the SecondMax example in
http://www.csis.gvsu.edu/GeneralInfo/Oracle/appdev.920/a96595/dci11agg.htm#1004821
But even seems that even a simpler aggregate function like one strCat
below (which works) has problems because I get multiple permutations for
every combination. The natural way to solve this would be to create an
associative array as a static variable as part of the Histogram (see
code below). However, apparently Oracle refuses to accept associate
arrays in this context (PLS-00355 use of pl/sql table not allowed in
this context).
If there is no easy way to do the histogram quickly can we at least get
something like strCat to work in a specific order with a "partition by
... order by clause"? It seems that even with "PARALLEL_ENABLE"
commented out strCat still calls merge for function calls like:
select hr,qtr, count(tzrwy) rwys,
noam.strCat(cnt) rwycnt,
noam.strCat(tzrwy) config,
sum(cnt) cnt, min(minscore) minscore, max(maxscore) maxscore from
ordrwys group by hr,qtr
Not only does this create duplicate entries in the query result like
"A,B,C" and "A,C,B" it seems that the order in rwycnt and config are not
always the same so a user can not match the results based on their
order.
The difference between my functions and functions like sum and the
secondMax demonstrated in the documentation is that secondMax does not
care about the order in which it gets its arguments and does not need to
maintain an ordered set in order to return the correct results. A good
example of a built in oracle function that does care about all its
arguments and probably has to maintain a similar data structure to the
one I want is the PERCTILE_DISC function. If you can find the code for
that function (or something like it) and forward a reference to me that
in itself would be very helpful.
Thanks,
K.Dingle
CREATE OR REPLACE type Histogram as object
-- TYPE Hist10 IS TABLE OF pls_integer INDEX BY varchar2(10),
-- retval hist10;
-- retval number,
retval noam.const.hist10,
static function ODCIAggregateInitialize (sctx IN OUT Histogram)
return number,
member function ODCIAggregateIterate (self IN OUT Histogram,
value IN varchar2) return number,
member function ODCIAggregateTerminate (self IN Histogram,
returnValue OUT varchar2,
flags IN number) return number,
member function ODCIAggregateMerge (self IN OUT Histogram,
ctx2 IN Histogram) return number
CREATE OR REPLACE type body Histogram is
static function ODCIAggregateInitialize(sctx IN OUT Histogram) return
number is
begin
sctx := const.Hist10();
return ODCIConst.Success;
end;
member function ODCIAggregateIterate(self IN OUT Histogram, value IN
varchar2)
return number is
begin
if self.retval.exist(value)
then self.retval(value):=self.retval(value)+1;
else self.retval(value):=1;
end if;
return ODCIConst.Success;
end;
member function ODCIAggregateTerminate(self IN Histogram,
returnValue OUT varchar2,
flags IN number)
return number is
begin
returnValue := self.retval;
return ODCIConst.Success;
end;
member function ODCIAggregateMerge(self IN OUT Histogram,
ctx2 IN Histogram) return number is
begin
i := ctx2.FIRST; -- get subscript of first element
WHILE i IS NOT NULL LOOP
if self.retval.exist(ctx2(i))
then self.retval(i):=self.retval(i)+ctx2.retval(i);
else self.retval(value):=ctx2.retval(i);
end if;
i := ctx2.NEXT(i); -- get subscript of next element
END LOOP;
return ODCIConst.Success;
end;
end;
CREATE OR REPLACE type stringCat as object
retval varchar2(16383), -- concat of all value to now varchar2, --
highest value seen so far
static function ODCIAggregateInitialize (sctx IN OUT stringCat)
return number,
member function ODCIAggregateIterate (self IN OUT stringCat,
value IN varchar2) return number,
member function ODCIAggregateTerminate (self IN stringCat,
returnValue OUT varchar2,
flags IN number) return number,
member function ODCIAggregateMerge (self IN OUT stringCat,
ctx2 IN stringCat) return number
CREATE OR REPLACE type body stringCat is
static function ODCIAggregateInitialize(sctx IN OUT stringCat) return
number is
begin
sctx := stringCat('');
return ODCIConst.Success;
end;
member function ODCIAggregateIterate(self IN OUT stringCat, value IN
varchar2)
return number is
begin
if self.retval is null
then self.retval:=value;
else self.retval:=self.retval || ',' || value;
end if;
return ODCIConst.Success;
end;
member function ODCIAggregateTerminate(self IN stringCat,
returnValue OUT varchar2,
flags IN number)
return number is
begin
returnValue := self.retval;
return ODCIConst.Success;
end;
member function ODCIAggregateMerge(self IN OUT stringCat,
ctx2 IN stringCat) return number is
begin
self.retval := self.retval || ctx2.retval;
return ODCIConst.Success;
end;
end;
CREATE OR REPLACE FUNCTION StrCat (input varchar2) RETURN varchar2
-- PARALLEL_ENABLE
AGGREGATE USING StringCat;GraphicsConfiguration is an abstract class. You would need to subclass it. From the line of code you posted, it seems like you are going about things the wrong way. What are you trying to accomplish? Shouldn't this question be posted in the Swing or AWT forum?
-
User defined xquery function with index enabled
If I use user defined xquery function, can the index be applied within the function?
trados.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by () -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/repository/trados" targetNamespace="http://ecoit.hp.com/ecg/repository/trados" elementFormDefault="qualified">
<complexType name="entry">
<sequence>
<element name="base" type="string"/>
<element name="translation" maxOccurs="unbounded">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="lang"/>
</extension>
</simpleContent>
</complexType>
</element>
</sequence>
<attribute name="xpath" type="string" use="required" xdb:SQLName="XPATH"/>
<attribute name="locator" type="string" use="required"/>
</complexType>
<simpleType name="languages">
<list itemType="string"/>
</simpleType>
<element name="trados" xdb:defaultTable="ECG_REP_TRADOS_TAB" xdb:tableProps="VARRAY XMLDATA.ENTRY STORE AS TABLE ECG_REP_TRADOS_ENTRY_TAB ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX OVERFLOW)">
<complexType>
<sequence>
<element name="entry" type="tns:entry" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="ENTRY"/>
</sequence>
<attribute name="cid" type="string"/>
<attribute name="path" type="string"/>
<attribute name="lang" type="string"/>
<attribute name="langs" type="tns:languages"/>
<attribute name="oldversion" type="string"/>
</complexType>
</element>
</schema>
CREATE INDEX ECG_REP_ENTRY_XPATH_IDX ON ECG_REP_TRADOS_ENTRY_TAB ("XPATH", "NESTED_TABLE_ID")
eco_category.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
<!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com) by Scott Dismukes (Hewlett Packard)-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/repository/eco/category" xmlns:cns="http://ecoit.hp.com/ecg/repository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/eco/category" elementFormDefault="qualified">
<import namespace="http://ecoit.hp.com/ecg/repository/types" schemaLocation="../types.xsd"/>
<complexType name="productFamilies">
<sequence>
<element name="productFamily" type="tns:productFamily" minOccurs="0" maxOccurs="unbounded"/>
<element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="lang" use="required" xdb:SQLName="LANG">
<simpleType>
<restriction base="string">
<length value="5"/>
</restriction>
</simpleType>
</attribute>
<attribute name="version" use="required" xdb:SQLName="VERSION">
<simpleType>
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
</attribute>
</complexType>
<complexType name="productCategory">
<sequence>
<element name="label" type="cns:label"/>
<element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded" xdb:defaultTable="ECG_REP_ECO_CATALOG_PC_TAB"/>
<element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="cns:id" use="required"/>
</complexType>
<complexType name="productCategories">
<sequence>
<element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="column">
<sequence>
<element name="label" type="cns:label"/>
</sequence>
<attribute name="id" type="cns:id" use="required"/>
</complexType>
<complexType name="product">
<sequence>
<element name="label" type="cns:label"/>
<element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="cns:id" use="required"/>
</complexType>
<complexType name="productFamily">
<sequence>
<element name="label" type="cns:label"/>
<element name="image" type="cns:image" minOccurs="0" maxOccurs="unbounded"/>
<element name="link" type="cns:link" minOccurs="0" maxOccurs="unbounded"/>
<element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
<element name="productCategories" type="tns:productCategories" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="id" type="cns:id" use="required"/>
</complexType>
<element name="productFamilies" type="tns:productFamilies" xdb:defaultTable="ECG_REP_ECO_CATALOG_TAB"/>
</schema>
xquery
xquery version "1.0";
declare namespace typ = "http://ecoit.hp.com/ecg/repository/types";
declare namespace c = "http://ecoit.hp.com/ecg/repository/eco/category";
declare namespace t = "http://ecoit.hp.com/ecg/repository/trados";
declare variable $c := $res/c:productFamilies;
declare function local:pc($pc as element(c:productCategory), $x as xs:string) as element()
<c:productCategory id="{$pc/@id}">
<c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
for $p in $pc/c:product
return local:p($p, concat($x, "/product/[@id=", $p/@id, "]"))
for $pcc in $pc/c:productCategory
return local:pc($pcc, concat($x, "/productCategory[@id=", $pcc/@id, "]"))
</c:productCategory>
declare function local:p($p as element(c:product), $x as xs:string) as element()
<c:product id="{$p/@id}">
<c:label>{string($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
for $col in $p/c:column
return
<c:column id="{$col/@id}">
<c:label>
let $e := $es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]
return
if(exists($e)) then string($e/t:translation)
else $col/c:label/text()
</c:label>
</c:column>
</c:product>
<c:productFamiles xsi:schemaLocation="http://ecoit.hp.com/ecg/repository/eco/category http://ecoit.hp.com/ecg/repository/eco/category.xsd http://ecoit.hp.com/ecg/repository/types http://ecoit.hp.com/ecg/repository/types.xsd" lang="{$lang/lang/text()}" version="{$c/@version}">
for $pf in $c/c:productFamily
let $x := concat("/productFamily[@id=", $pf/@id, "]")
return
<c:productFamily id="{$pf/@id}">
(:xpath index can not be applied within function:)
<c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
for $img in $pf/c:image
return $img
for $link in $pf/c:link
return $link
for $col in $pf/c:column
return
<c:column id="{$col/@id}">
<c:label>{data($es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]/t:translation)}</c:label>
</c:column>
for $pcs in $pf/c:productCategories
return
<c:productCategories>
for $pc in $pcs/c:productCategory
return local:pc($pc, concat($x, "/productCategories/productCategory[@id=", $pc/@id, "]"))
</c:productCategories>
</c:productFamily>
for $p in $c/c:product
return local:p($p, concat("/product[@id=", $p/@id, "]"))
</c:productFamiles>
Message was edited by:
John LeeJohn
Am i missing a bit of the Xquery
In 11.1,0.6.0 I get
Elapsed: 00:00:00.04
SQL> set echo on
SQL> spool testcase.log
SQL> --
SQL> connect sys/ as sysdba
Enter password:
Connected.
SQL> set define on
SQL> set timing on
SQL> --
SQL> define USERNAME = HPECO
SQL> --
SQL> def PASSWORD = HPECO
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user HPECO cascade
User dropped.
Elapsed: 00:00:18.12
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSW
ORD
2 /
old 1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &P
ASSWORD
new 1: grant create any directory, drop any directory, connect, resource, alter session, create view to HPECO identified by HPECO
Grant succeeded.
Elapsed: 00:00:00.03
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user HPECO default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> alter session set events ='19027 trace name context forever, level 0x800'
2 /
Session altered.
Elapsed: 00:00:00.00
SQL> --
SQL> declare
2 xmlschema xmltype := XMLTYPE(
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
5 <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
ository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/types" elementFormDefault="qualified">
6 <complexType name="item">
7 <simpleContent>
8 <extension base="tns:content">
9 <attribute name="id" type="tns:id" use="required"/>
10 </extension>
11 </simpleContent>
12 </complexType>
13 <complexType name="items">
14 <sequence>
15 <element name="item" type="tns:item" maxOccurs="unbounded"/>
16 </sequence>
17 <attribute name="id" type="tns:id" use="required"/>
18 </complexType>
19 <complexType name="mappings">
20 <sequence>
21 <element name="item" type="tns:item" minOccurs="0" maxOccurs="unbounded"/>
22 <element name="items" type="tns:items" minOccurs="0" maxOccurs="unbounded"/>
23 </sequence>
24 </complexType>
25 <complexType name="local">
26 <sequence>
27 <element name="common">
28 <complexType>
29 <sequence>
30 <element name="texts" type="tns:mappings"/>
31 <element name="images" type="tns:mappings" minOccurs="0"/>
32 </sequence>
33 </complexType>
34 </element>
35 <element name="section" minOccurs="0" maxOccurs="unbounded">
36 <complexType>
37 <sequence>
38 <element name="texts" type="tns:mappings"/>
39 <element name="images" type="tns:mappings" minOccurs="0"/>
40 </sequence>
41 <attribute name="id" use="required">
42 <simpleType>
43 <restriction base="string">
44 <maxLength value="32"/>
45 </restriction>
46 </simpleType>
47 </attribute>
48 </complexType>
49 </element>
50 </sequence>
51 <attribute name="lang" use="required" xdb:SQLName="LANG">
52 <simpleType>
53 <restriction base="string">
54 <length value="5"/>
55 </restriction>
56 </simpleType>
57 </attribute>
58 </complexType>
59 <complexType name="link">
60 <sequence>
61 <element name="url" type="tns:url"/>
62 <element name="label" type="tns:label"/>
63 <element name="image" type="tns:image" minOccurs="0"/>
64 </sequence>
65 <attribute name="id" type="tns:id"/>
66 </complexType>
67 <complexType name="image">
68 <sequence>
69 <element name="url" type="string"/>
70 <element name="label" type="tns:label" minOccurs="0"/>
71 </sequence>
72 <attribute name="id" type="tns:id" use="optional"/>
73 </complexType>
74 <simpleType name="id">
75 <restriction base="string">
76 <maxLength value="100"/>
77 </restriction>
78 </simpleType>
79 <simpleType name="label">
80 <restriction base="string">
81 <maxLength value="200"/>
82 </restriction>
83 </simpleType>
84 <simpleType name="content">
85 <restriction base="string">
86 <maxLength value="4000"/>
87 </restriction>
88 </simpleType>
89 <simpleType name="url">
90 <restriction base="string">
91 <maxLength value="256"/>
92 </restriction>
93 </simpleType>
94 </schema>');
95 begin
96 dbms_xmlschema.registerSchema
97 (
98 schemaurl => 'http://ecoit.hp.com/ecg/repository/types.xsd'
99 ,schemadoc => xmlschema
100 ,local => TRUE
101 ,genBean => false
102 ,genTypes => TRUE
103 ,genTables => TRUE
104 ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
105 );
106 end;
107 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.35
SQL>
SQL> declare
2 xmlschema xmltype := XMLTYPE(
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by () -->
5 <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
ository/trados" targetNamespace="http://ecoit.hp.com/ecg/repository/trados" elementFormDefault="qualified">
6 <complexType name="entry">
7 <sequence>
8 <element name="base" type="string"/>
9 <element name="translation" maxOccurs="unbounded">
10 <complexType>
11 <simpleContent>
12 <extension base="string">
13 <attribute name="lang"/>
14 </extension>
15 </simpleContent>
16 </complexType>
17 </element>
18 </sequence>
19 <attribute name="xpath" type="string" use="required" xdb:SQLName="XPATH"/>
20 <attribute name="locator" type="string" use="required"/>
21 </complexType>
22 <simpleType name="languages">
23 <list itemType="string"/>
24 </simpleType>
25 <element name="trados" xdb:defaultTable="ECG_REP_TRADOS_TAB" xdb:tableProps="VARRAY XMLDATA.ENTRY STORE AS TABLE ECG_REP_TRA
DOS_ENTRY_TAB ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX OVERFLOW)">
26 <complexType>
27 <sequence>
28 <element name="entry" type="tns:entry" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="ENTRY"/>
29 </sequence>
30 <attribute name="cid" type="string"/>
31 <attribute name="path" type="string"/>
32 <attribute name="lang" type="string"/>
33 <attribute name="langs" type="tns:languages"/>
34 <attribute name="oldversion" type="string"/>
35 </complexType>
36 </element>
37 </schema>');
38 begin
39 dbms_xmlschema.registerSchema
40 (
41 schemaurl => 'http://ecoit.hp.com/ecg/repository/trados.xsd'
42 ,schemadoc => xmlschema
43 ,local => TRUE
44 ,genBean => false
45 ,genTypes => TRUE
46 ,genTables => TRUE
47 ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
48 );
49 end;
50 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.68
SQL> declare
2 xmlschema xmltype := XMLTYPE(
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <!-- edited with XMLSpy v2008 (http://www.altova.com) by Jan-Erik Pedersen (HEWLETT PACKARD) -->
5 <!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com) by Scott Dismukes (Hewlett Packard)-->
6 <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:tns="http://ecoit.hp.com/ecg/rep
ository/eco/category" xmlns:cns="http://ecoit.hp.com/ecg/repository/types" targetNamespace="http://ecoit.hp.com/ecg/repository/eco/c
ategory" elementFormDefault="qualified">
7 <import namespace="http://ecoit.hp.com/ecg/repository/types" schemaLocation="http://ecoit.hp.com/ecg/repository/types.xsd"/>
8 <complexType name="productFamilies">
9 <sequence>
10 <element name="productFamily" type="tns:productFamily" minOccurs="0" maxOccurs="unbounded"/>
11 <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
12 </sequence>
13 <attribute name="lang" use="required" xdb:SQLName="LANG">
14 <simpleType>
15 <restriction base="string">
16 <length value="5"/>
17 </restriction>
18 </simpleType>
19 </attribute>
20 <attribute name="version" use="required" xdb:SQLName="VERSION">
21 <simpleType>
22 <restriction base="string">
23 <maxLength value="100"/>
24 </restriction>
25 </simpleType>
26 </attribute>
27 </complexType>
28 <complexType name="productCategory">
29 <sequence>
30 <element name="label" type="cns:label"/>
31 <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded" xdb:defaultTa
ble="ECG_REP_ECO_CATALOG_PC_TAB"/>
32 <element name="product" type="tns:product" minOccurs="0" maxOccurs="unbounded"/>
33 </sequence>
34 <attribute name="id" type="cns:id" use="required"/>
35 </complexType>
36 <complexType name="productCategories">
37 <sequence>
38 <element name="productCategory" type="tns:productCategory" minOccurs="0" maxOccurs="unbounded"/>
39 </sequence>
40 </complexType>
41 <complexType name="column">
42 <sequence>
43 <element name="label" type="cns:label"/>
44 </sequence>
45 <attribute name="id" type="cns:id" use="required"/>
46 </complexType>
47 <complexType name="product">
48 <sequence>
49 <element name="label" type="cns:label"/>
50 <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
51 </sequence>
52 <attribute name="id" type="cns:id" use="required"/>
53 </complexType>
54 <complexType name="productFamily">
55 <sequence>
56 <element name="label" type="cns:label"/>
57 <element name="image" type="cns:image" minOccurs="0" maxOccurs="unbounded"/>
58 <element name="link" type="cns:link" minOccurs="0" maxOccurs="unbounded"/>
59 <element name="column" type="tns:column" minOccurs="0" maxOccurs="unbounded"/>
60 <element name="productCategories" type="tns:productCategories" minOccurs="0" maxOccurs="unbounded"/>
61 </sequence>
62 <attribute name="id" type="cns:id" use="required"/>
63 </complexType>
64 <element name="productFamilies" type="tns:productFamilies" xdb:defaultTable="ECG_REP_ECO_CATALOG_TAB"/>
65 </schema>
66 ');
67 begin
68 dbms_xmlschema.registerSchema
69 (
70 schemaurl => 'http://ecoit.hp.com/ecg/repository/eco/category.xsd'
71 ,schemadoc => xmlschema
72 ,local => TRUE
73 ,genBean => false
74 ,genTypes => TRUE
75 ,genTables => TRUE
76 ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
77 );
78 end;
79 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.65
SQL> CREATE INDEX ECG_REP_ENTRY_XPATH_IDX ON ECG_REP_TRADOS_ENTRY_TAB ("XPATH", "NESTED_TABLE_ID")
2 /
Index created.
Elapsed: 00:00:00.01
SQL> set pages 0 lines 160
SQL> set long 10000
SQL> --
SQL> set autotrace on explain
SQL> --
SQL> xquery
2 xquery version "1.0";
3
4 declare namespace typ = "http://ecoit.hp.com/ecg/repository/types";
5 declare namespace c = "http://ecoit.hp.com/ecg/repository/eco/category";
6 declare namespace t = "http://ecoit.hp.com/ecg/repository/trados";
7
8 declare variable $c := $res/c:productFamilies;
9
10 declare function local:pc($pc as element(c:productCategory), $x as xs:string) as element() {
11 <c:productCategory id="{$pc/@id}">
12 {
13 <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
14 ,
15 for $p in $pc/c:product
16 return local:p($p, concat($x, "/product/[@id=", $p/@id, "]"))
17 ,
18 for $pcc in $pc/c:productCategory
19 return local:pc($pcc, concat($x, "/productCategory[@id=", $pcc/@id, "]"))
20 }
21 </c:productCategory>
22 };
23
24 declare function local:p($p as element(c:product), $x as xs:string) as element() {
25 <c:product id="{$p/@id}">
26 {
27 <c:label>{string($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
28 ,
29 for $col in $p/c:column
30 return
31 <c:column id="{$col/@id}">
32 <c:label>
33 {
34 let $e := $es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]
35 return
36 if(exists($e)) then string($e/t:translation)
37 else $col/c:label/text()
38 }
39 </c:label>
40 </c:column>
41 }
42 </c:product>
43 };
44
45 <c:productFamiles xsi:schemaLocation="http://ecoit.hp.com/ecg/repository/eco/category http://ecoit.hp.com/ecg/repository/eco/ca
tegory.xsd http://ecoit.hp.com/ecg/repository/types http://ecoit.hp.com/ecg/repository/types.xsd" lang="{$lang/lang/text()}" versi
on="{$c/@version}"> {
46 for $pf in $c/c:productFamily
47 let $x := concat("/productFamily[@id=", $pf/@id, "]")
48 return
49 <c:productFamily id="{$pf/@id}">
50 {
51 (:xpath index can not be applied within function:)
52 <c:label>{data($es/t:entry[@xpath eq concat($x, "/label")]/t:translation)}</c:label>
53 ,
54 for $img in $pf/c:image
55 return $img
56 ,
57 for $link in $pf/c:link
58 return $link
59 ,
60 for $col in $pf/c:column
61 return
62 <c:column id="{$col/@id}">
63 <c:label>{data($es/t:entry[@xpath eq concat($x, "/column[@id=", $col/@id, "]/label")]/t:translation)}</c:lab
el>
64 </c:column>
65 ,
66 for $pcs in $pf/c:productCategories
67 return
68 <c:productCategories>
69 {
70 for $pc in $pcs/c:productCategory
71 return local:pc($pc, concat($x, "/productCategories/productCategory[@id=", $pc/@id, "]"))
72 }
73 </c:productCategories>
74 }
75 </c:productFamily>
76 ,
77 for $p in $c/c:product
78 return local:p($p, concat("/product[@id=", $p/@id, "]")) } </c:productFamiles>
79 /
ERROR:
ORA-19228: XPST0008 - undeclared identifier: prefix 'res' local-name ''
Elapsed: 00:00:00.01
SQL>
Maybe you are looking for
-
Want to downgrade iphone from 9.4.3 to 9.4.2
upgraded the system to 10.8.2 and after the upgrade iphoto is not working. When i try to open it says iphoto requires Mac OS X version 10.8.3 or later. I dont want to upgrade to 10.8.3, so anyway I can still use iphoto? If I try to download the 9.8.2
-
Windows 8 Uninstalled and reinstalled twice Go to open organizer, it loads until it tries to read the catalogue, then it just quits. No error message, no nothing, just disappears then I can't open it at all (click on the icon and nothng happens). I
-
I've got a 16x9, 300ppi, 75mb tiff file that LR converts to 1mb jpg. Export in LR 5 is being done at 100%, no file size reduction. Can't figure out why it is downsizing so small? Even upsized to 420ppi in PS and the export was still only 2mb. Stoc
-
Started getting these today Asking me to check my connections etc etc Done all that of course and still happening. Many reboots later and still no progress Infinity working fine but seems to be a problem with Vision+ box not connecting to hub ? HELP
-
Audigy 2 ZS Newbie Question? Is my front panel working rig
WHOA! I'm new with this card but not posting..don't know what happened with that blank post..(The cat stepped on the "Enter" key...Yea..thats it..thats the ticket) Anyway, I just hooked up my card and installed my front panel and I have a couple of d