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 » refid in XMLNS Document and ESQL

Post new topic  Reply to topic
 refid in XMLNS Document and ESQL « View previous topic :: View next topic » 
Author Message
jcarr
PostPosted: Thu Nov 01, 2007 5:41 am    Post subject: refid in XMLNS Document and ESQL Reply with quote

Novice

Joined: 25 Apr 2006
Posts: 20
Location: Minneapolis, MN

I have a question hopefully someone can answer. The below example has a field called mom:insured with an attribute of refid="contact_party1.id".
You can follow that refid to the tag: <mom:Party id="contact_party1.id">

Using ESQL, how can I write a relative navigation using the refid?

Any ideas? Thanks in advance.

<?xml version="1.0" encoding="UTF-8"?>
<mom:MomPolicyRetrievalResultset
xmlns:mom="http://www.guidewire.com/cc/mom"
xmlns:mombase="http://www.guidewire.com/base/mom"
xmlns:momext="http://www.guidewire.com/cc/momext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<mom:Policy>
<mom:policySource>AS400</mom:policySource>
<mom:effectiveDate>2007-01-01</mom:effectiveDate>
<mom:expirationDate>2008-01-01</mom:expirationDate>
<mom:insured refId="contact_party1.id" />
<mom:policyNumber>9999999</mom:policyNumber>
<mom:policyType>some_type</mom:policyType>
<mom:status>active</mom:status>
<mom:companyName_CG>Galactic Empire</mom:companyName_CG>
<mom:lossesExist_CG>false</mom:lossesExist_CG>
<mom:policyKeyInfo_CG>20080101</mom:policyKeyInfo_CG>
<mom:writingCompany_CG>99</mom:writingCompany_CG>
<mom:productLine_CG>01</mom:productLine_CG>
<mom:groupNumber_CG>40801</mom:groupNumber_CG>
<mom:groupName_CG>SithProtect</mom:groupName_CG>
<mom:moreNotes_CG>true</mom:moreNotes_CG>
</mom:Policy>
<mom:Party id="contact_party1.id">
<mom:type>P</mom:type>
<mom:person>
<mom:address>
<mom:category>Home</mom:category>
<mom:medium refId="contact_address.id" />
</mom:address>
<mom:telephone>
<mom:category>Home</mom:category>
<mom:medium refId="insured_phone1.id" />
</mom:telephone>
<mom:personName>
<mom:firstName>Dath</mom:firstName>
<mom:lastName>Vader</mom:lastName>
</mom:personName>
<mom:primaryLanguage_CG>english</mom:primaryLanguage_CG>
<mom:licenseType />
</mom:person>
</mom:Party>
</mom:MomPolicyRetrievalResultset>
_________________
If you can read this, you're too close.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Nov 01, 2007 5:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can use {} to evaluate a variable as a single-level name qualifier.

That is, if you have the string "abc" stored in a variable, you can do something like
Code:
OutputRoot.XMLNS.root.{myVariable}
to access OutputRoot.XMLNS.root.abc.

But if it's "abc.def", you can't do that to access OutputRoot.XMLNS.root.abc.def
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jcarr
PostPosted: Thu Nov 01, 2007 6:20 am    Post subject: Reply with quote

Novice

Joined: 25 Apr 2006
Posts: 20
Location: Minneapolis, MN

I understand what you are saying, but I don't see how
you can use {} to create a navigation based on an XMLNSC attribute.

So how can I use the "contact_party1.id" attribute as a navigation to
get to <mom:type>P</mom:type> ?

<mom:insured refId="contact_party1.id" />
...

<mom:Party id="contact_party1.id">
<mom:type>P</mom:type>
...

</mom:Party>

Perhaps I'm missing the point.
Thanks in advance.
_________________
If you can read this, you're too close.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Nov 01, 2007 6:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Oh, I see.

You'll need to use a SELECT.

Isn't ACORD a wonderful standard?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jcarr
PostPosted: Thu Nov 01, 2007 6:59 am    Post subject: Reply with quote

Novice

Joined: 25 Apr 2006
Posts: 20
Location: Minneapolis, MN

Works like a champ. Here's the sample code I did:

set OutputRoot.XMLNSC.dad:TestRec.dad:PartyType =
select InputBody.mom:MomPolicyRetrievalResultset.mom:Party.mom:type
from InputBody.mom:MomPolicyRetrievalResultset.mom:Party
where InputBody.mom:MomPolicyRetrievalResultset.mom:Party.(XMLNSC.Attribute)id = 'contact_party1.id';
_________________
If you can read this, you're too close.
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 » refid in XMLNS Document and ESQL
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.