on 12-08-2008 11:51 AM
Hi Experts,
I am stucked with a condition in XPATH which is not executing. I want to use substring function in the Expression Editor. In the source structure field IDTNR at path /ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR if the field value of IDTNR starts with a D(for eg DADHJI) then I have to block this particular message or else(eg ASHDJKKD) pass for other values. I have tried following ways so far.
(ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[(substring(.,0,1) ='D')] EX )
/ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNRhttp://not(starts-with(.,"D"))
substring(ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR,0,1) = 'D'
And also can some body please expalin what is the meaning of http:// in the second statement as also in thread
Requesting you , please dont forward the links or blogs.
Thanks in Advance.
Sudhir
Hello,
Can you use the following and try:
substring(/ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR,0,1) = 'D'
Included forward slash ...
Regards,
Sreenivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudhir,
Just try with //IDTNR[<condition>]
it should work. Bcos
(//) Expression : Selects nodes in the document from the current node that match the selection no matter where they are
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
Many thanks for your replies.
Finally I have tried all the combinations with XPATH editor but no luck. But when I tried the same condition through BPM, Surprisingly it works out there with
ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[not(starts-with(.,"D"))]
So BPM is the one option I am left with. Can somebody please comment on why it is working in BPM and not in Receiver Determination?
Thanks!
Hello,
Can you check for case sensitive by comparing with 'D' and 'd'.
Regards,
Sreenivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Use the idex as (string,1,1);
http://www.w3schools.com/xpath/xpath_functions.asp
Regards,
Sreenivas
Hi Sudhir
I think
substring(string,start,length) or substring(string,start)
should work on this.
Moreover try with
contains(String,contain string) or starts-with(String, Starts with String)
I am not sure if it get problem with escape sequences in String. Check again.
You can also use
substring-before(String, String) or substring-after(String,String)
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for the replies!
@Dharamveer, I have tried the suggestion in the link but it dint work here.
@Prateek, I have tried the solution given by you with Namespace and without using namespace, It still not worked.
@Sreenivas, I have tried this also
@Vijay, It is really a nice blog by you but unfortunatly I dint find any solution to my problem.
Thanks All.
What else I can try?
testing : /p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR [http://not(starts-with(.,\"D\"))]
Awaiting replies.
Hey Sudhir,
As I said earlier, its just a mistake in posting. The [ character is replaced by http://.
Regards,
Prateek
Check if this works (similar to first expression). Are you providing the namespace too?
/p1:ORDERS01/IDOC/E1EDP01/E1EDP19/IDTNR[(substring(.,0,1)]
I think that http:// is posted by mistake. Doesn't seem to be logical.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.