on 09-23-2010 10:02 AM
Hi Everyone ,
In the link editor , we have the expression editor for entering expressions to assign a value to a target xpath.
I would like to know the actual code behind it , like the platform and technology used.
I tried some xpath functions , among them few are working and remaining are not. Apart from the standard functions provided in it , I would like to explore much more functions that can be used in Expression editor to reduce the transaction size and improve its performance.
Simply it is like the background process ,How the expressions entered in the Expression editor are accessed and what kind of operations are performed ?
Hi Kedar ,
I tried count() , sum() and avg() functions among which avg() is not working .
Some other functions like remove() is also not working.
Hence , I got confused and I wanna get a clear Idea about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kedar ,
Thanks for your response.
My problem is not with average or sum function. I know some functions are available in MII expression editor but to make use of XPATH functions and JAVA features as these are the background coding for MII I would like to know why only some of those XPATH functions are showing results and some are not.
I'm trying this to make my applications optimized in terms of performance and size.
If you know the reason , please tell me.
Sravan,
All of these xPath functions work as I have used them in transactions using the expression editor. For example the syntax for count would be Document_0.Output{count(/Rowsets/Rowset/Row)}. The same would be true for Sum or some of the other ones you mentioned depending on what you exactly you want. This example provided will give you the count for the whole dataset/document.
Erik
Hi Sravan,
XPath 1.0 does not support "avg" function. XPath 2.0 does support this function.
Have a look at below links:
http://www.edankert.com/xpathfunctions.html
http://www.w3.org/TR/xpath-functions/
As far as my knowledge goes, MII 1.5 onwards uses XPath 2.0 functions.
Hope this helps!
Best Regards,
Kedar
Hi Sravan,
I like your idea to improve performance by purposeful use of XPath functions in MII.
In addition to what Diana said you can use a combination of functions that work to "workaround" functions that do not work. For your two examples, the following construct works in MII:
instead of avg(), use
Local.TestXML{sum(/Rowsets/Rowset/Row/MyNode) div count(/Rowsets/Rowset/Row/MyNode)}
instead of remove(), use
Local.TestXML{/Rowsets/Rowset/Row[position() != 1]/One} (e.g. in a repeater to avoid row 1)
Michael
Hi Sravan,
Please find the below links that will help you in finding all the Expression Editor functions and operators.
http://wbhelp.sap.com/manufacturing/xmii_120/en/45/bf7f3b692f52f5e10000000a1553f7/content.htm
http://wbhelp.sap.com/manufacturing/xmii_120/en/46/c0a6f77a501824e10000000a1553f6/content.htm
I tried almost all of them and they worked fine for me.
Asfar as my knowledge goes, the editor is developed in Java/J2EE.
Which XPATH functions you tried?
Please refer to the next link for some examples: http://www.w3schools.com/xpath/xpath_examples.asp
Hope it helps.
Best Regards,
Kedar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.