Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Open Points: 250 Time: 23:41 - Aug 10, 2009
anujojha1
Hi I have this xml file from which i need to display the images in table format using xslt. like if there are 4 pictures then I need to display the 1st picture in the 1st row 1st column, 2nd in 1st row 2nd column, 3rd in 2nd row 1st column and so on... can you please help me to do it??? till now this is what i could do... -------------------------XSL--------------------------------------------- <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="assrec.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform&...... <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-t... <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Untitled Document</title> </head> <body> <table cellspacing="0px" cellpadding="1px" style="width:192px; border:0px; color:#999999;"> <tr> <th align='center' colspan="2" style=" background-image:url(images/menutop.gif); background-repeat:repeat; height:30px; color: #CCCCCC; font:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold;">Employee</th> </tr> <xsl:for-each select="ListItems/ListItem"> <tr style="background-image: url(images/menumiddle.gif); background-repeat:repeat; width:192px; height:80px;"> <td ><img src="{image/@href}" width="75" height="70" align="right" style="border: solid; border-color:#999999; border-width:2px; "/><br /> <xsl:value-of select="name"/></td> <td> <img src="{image/@href}" width="75" height="70" align="right" style="border: solid; border-color:#999999; border-width:2px; "/> <br /> <xsl:value-of select="name"/></td> </tr> </xsl:for-each> <tr> <td colspan="2" style=" background-image:url(images/menubottom.gif); color:#000000">. </td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet> ------------------------------------------------------XML---------------------- -------------------------- <?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?> <?xml:stylesheet type="text/xsl" href="assrec.xsl"?> <ListItems> <ListItem> <image href="C:\wampserver 2\www\aafes test\my\by vickey\cdtest\images\member1.jpg"> </image> <name>anuj</name> </ListItem> <ListItem> <image href="C:\wampserver 2\www\aafes test\my\by vickey\cdtest\images\member2.jpg"> </image> <name>bb</name> </ListItem> <ListItem> <image href="C:\wampserver 2\www\aafes test\my\by vickey\cdtest\images\member3.jpg"> </image> <name>anuj</name> </ListItem> <ListItem> <image href="C:\wampserver 2\www\aafes test\my\by vickey\cdtest\images\member4.jpg"> </image> <name>bb</name> </ListItem> </ListItems>
Categories:
Add Categories
When adding more than one category, separate them with commas.
This question has not yet been answered.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
Need help to display the images in row and column format.
You have 100 characters to use
Rank
Expert
Points
1.
10354
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software