Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2006, 04:45 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Hannibal
Default

As i told, The table structure should be like this. Its just a report which groups the query,condition and the Association_rule. The tables do not have any relation

 
Old November 24th, 2006, 05:11 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Hannibal
Default

I understand that the input has no relationship with the output that i want. Consider this, a table can have more than 2 or 3 columns, and it varies from table to table. The Query,condition,Association_rule are to be just provided as an output sequentially one after another, even though no relation exists. Hope this helps in understanding

 
Old November 24th, 2006, 05:16 AM
Authorized User
 
Join Date: Dec 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ramesh.kumarm
Default

Is that like u r getting this
________________________________________
Table Columns Query Condition Association Rule
Mine Blue Select all 1
         Red
         Green
Others white Insert = 2
         orange
________________________________________

and that u need the insert/=/2 mapped to red.

If so you cannot have a generalized loop.
U need to dig down to fetch the values u need.

thanx

 
Old November 24th, 2006, 05:54 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Hannibal
Default

yes i am getting like this. But the required output is:
Table Columns Query Condition Association Rule

Mine Blue select all 1
          Red insert = 2
          Green
Others White
          Orange


 
Old November 24th, 2006, 05:57 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Hannibal
Default

Ramesh can you help me in getting the solution. I really need someone to help me

 
Old November 24th, 2006, 06:44 AM
Authorized User
 
Join Date: Dec 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ramesh.kumarm
Default

Well, if this is what youwant then dont loop it...rather pull the values and fix it.

 
Old November 24th, 2006, 06:52 AM
Authorized User
 
Join Date: Dec 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ramesh.kumarm
Default

do u need something like thi?

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <html>
            <body>
                <table border="1">
                    <tr bgcolor="#9acd32">
                        <th align="left">Table</th>
                        <th align="left">Columns</th>
                        <th align="left">Query</th>
                        <th align="left">Condition</th>
                        <th align="left">Association Rule</th>
                    </tr>
                    <tr>
                        <td><xsl:value-of select="//*/Catalog[1]/TableName"/></td>
                        <td><xsl:value-of select="//*/Catalog[1]/Column1"/></td>
                        <td><xsl:value-of select="//*/Catalog[1]/Query"/></td>
                        <td><xsl:value-of select="//*/Catalog[1]/Condition"/></td>
                        <td><xsl:value-of select="//*/Catalog[1]/Association_rule"/></td>
                    </tr>
                    <tr>
                        <td/>
                        <td><xsl:value-of select="//*/Catalog[1]/Column2"/></td>
                        <td><xsl:value-of select="//*/Catalog[2]/Query"/></td>
                        <td><xsl:value-of select="//*/Catalog[2]/Condition"/></td>
                        <td><xsl:value-of select="//*/Catalog[2]/Association_rule"/></td>
                    </tr>
                    <tr>
                        <td/>
                        <td><xsl:value-of select="//*/Catalog[1]/Column3"/></td>
                    </tr>
                    <tr>
                        <td><xsl:value-of select="//*/Catalog[2]/TableName"/></td>
                        <td><xsl:value-of select="//*/Catalog[2]/Column1"/></td>
                    </tr>
                    <tr>
                        <td/>
                        <td><xsl:value-of select="//*/Catalog[2]/Column2"/></td>
                    </tr>
                </table>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>






Similar Threads
Thread Thread Starter Forum Replies Last Post
PDF to XML conversion bcogney XSLT 7 September 21st, 2011 06:27 AM
string to binary conversion in XSLT navi25584 XSLT 5 September 3rd, 2008 03:14 AM
XSLT conversion question jastao XSLT 3 April 29th, 2008 09:09 PM
Very confused on XML to XML conversion mal141 XSLT 2 August 11th, 2006 02:44 AM
XSLT unix timestamp conversion Weezel XSLT 2 January 28th, 2005 02:12 PM





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