Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 23rd, 2004, 05:43 AM
Registered User
 
Join Date: Mar 2004
Location: kashipur, ua, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default small problem

Hi all,

I know my question is very basic but i was not able to find a similar code.
I have the original xml like this:


<SIBFlow>

<OPB Name="START" Functionality="ctl_start" Type="START" Comment="It starts a service flow design" SIBFile="\General\start">
<Connection_List>
        <Connection Name="Next" Functionality="on_next()" NextOPB="incoming" Comment="Connection to next OPB"/>
        </Connection_List>
    </OPB>


<OPB Name="incoming" Functionality="incoming" Type="Simple" Comment="Top level action" SIBFile="\User Defined\CPL">
<Connection_List>
        <Connection Name="next node" Functionality="next node" NextOPB="location" Comment="Any node that follows directly"/>
        </Connection_List>
    </OPB>

<OPB Name="location" Functionality="location" Type="Simple" Comment="Specifies location literally." SIBFile="\User Defined\CPL">
<Connection_List>
            <Connection Name="next node" Functionality="Next Node" NextOPB="lookup" Comment="Any node that follows directly."/>
        </Connection_List>
    </OPB>

<OPB Name="lookup" Functionality="lookup" Type="Simple" Comment="To specify location through a external mean." SIBFile="\User Defined\CPL">
<Connection_List>
            <Connection Name="success" Functionality="Next node" NextOPB="location1" Comment="Next node if lookup was successful."/>
</Connection_List>
    </OPB>

<OPB Name="location1" Functionality="location" Type="Simple" Comment="Specifies location literally." SIBFile="\User Defined\CPL">
<Connection_List>
            <Connection Name="next node" Functionality="Next Node" NextOPB="END" Comment="Any node that follows directly."/>
        </Connection_List>
    </OPB>

    <OPB Name="END" Functionality="ctl_end" Type="END" Comment="Ends a service flow design" SIBFile="\General\END">
<Connection_List/>
    </OPB>
</SIBFlow>



The desired output is that we should start from the OPB named-'START' and follow the connections through NEXTOPB,till end.
the output may look like
<cpl>
<incoming>
<location url="hello.com" --- >
<lookup source="test.com" - - - >
<success>
<location url="final.com" - - - />
</success>
</lookup>
</location>
</incoming>
</cpl>



The problem faced in the xslt file is that how to go to the next OPB after reading the value of nextopb.

i have used
<xsl:template match="/opb/connection_list/connection/@NextOPB">

<xsl:apply-templates select="ancestor::SIBFlow/OPB[ @Name= . ]"/>


The problem is that it doesn't pickup the value of nextnode using '.' . So we cannot do the matching and hence cannot go to next node.
Please help me.




































harry
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
small problem with cookies Paula222 ASP.NET 2.0 Professional 0 May 25th, 2007 02:08 AM
small problem with cookies Paula222 ASP.NET 2.0 Basics 0 May 25th, 2007 02:05 AM
Generic & Dynamic XSLT but small problem..help pulin XSLT 3 April 29th, 2007 05:42 PM
Small problem VB (thanks!) kris5 VB How-To 2 November 27th, 2006 12:11 PM
Beginning VB6.0 Small Problem kalaiselvi Beginning VB 6 3 April 11th, 2005 01:24 PM



All times are GMT -4. The time now is 11:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.