ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL to English Code Translation

Post new topic  Reply to topic
 ESQL to English Code Translation « View previous topic :: View next topic » 
Author Message
DJN2
PostPosted: Tue Jun 14, 2011 9:11 am    Post subject: ESQL to English Code Translation Reply with quote

Apprentice

Joined: 02 Jan 2009
Posts: 27
Location: New Jersey

Can someone translate this sniptes of code.

1)
DECLARE refBody REFERENCE TO Root.XMLNSC.(XMLNSC.Element)*[<];
IF NOT EXISTS(refBody.*:"PFUProfiles"[])

.. in regards to the [<] in the first line and the *: in the second.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Jun 14, 2011 9:15 am    Post subject: Re: ESQL to English Code Translation Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

DJN2 wrote:
.. in regards to the [<] in the first line and the *: in the second.


The first line is explained here

The second line is a wildcard (*) to match any namespace ( : )
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
DJN2
PostPosted: Tue Jun 14, 2011 11:38 am    Post subject: Reply with quote

Apprentice

Joined: 02 Jan 2009
Posts: 27
Location: New Jersey

does that mean any namespace at all? What is the signifcance of 'PFUProfiles"?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Jun 14, 2011 11:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

DJN2 wrote:
does that mean any namespace at all? What is the signifcance of 'PFUProfiles"?


Yes, wildcard means "whatever the namespace is, match it anyway".

"PFUProfiles" is the name of an element.

What it means depends entirely on the meaning of the document in question.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 14, 2011 12:51 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This:
Code:
DECLARE refBody REFERENCE TO Root.XMLNSC.(XMLNSC.Element)*[<];
is declaraing a reference to the last child of InputRoot.XMLNSC that is an XML element ( a tag, as opposed to an attribute ). In other words, it is attempting to place a REF on the root tag of the document, while carefully avoiding the XML declaration, or any XML comments or processing instructions that are positioned as siblings of the root tag.
It could just as safely have taken the first element child, because the rules of XML don't allow more than one root tag per document. Not saying that the code is wrong, I'm just pointing out that < and > would both be correct.

This:
Code:
IF LASTMOVE(refBody) THEN
...should really be the next line, but the author clearly thought that it was safe to omit it. Maybe the author was correct - the XMLNSC parser would probably have issued a fatal error if there was no root tag.

This
Code:
IF NOT EXISTS(refBody.*:"PFUProfiles"[])
is checking whether there is any element with name 'PFUProfiles' as a direct child of the root tag. The namespace will not be checked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL to English Code Translation
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.