homepage Welcome to WebmasterWorld Guest from 54.227.215.140
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Beginner stylesheet question
egibberate

5+ Year Member



 
Msg#: 3828020 posted 6:59 pm on Jan 16, 2009 (gmt 0)

Hi,
just a day or so into this XML stuff so here goes.
I am trying to achieve this layout (without the lines!);

-------------------------------------------------

Harry Potter J.K. Rowling Fantasy

A fabulous rip roaring adventure from
start to finish, couldn't put it down
bla bla bla

-------------------------------------------------


<body>
<div id="div1">
<xsl:for-each select="reviews/book">
<xsl:value-of select="title"/>
<xsl:value-of select="author"/>
<xsl:value-of select="category"/>
</div>
<div id="div2">
<xsl:value-of select="review"/>
</div>
</xsl:for-each>
</mydiv>
</body>

I can't achieve it by doing the above. Can someone please give me some guidance as to how I can have the first three elements appear in one division and the fourth element in a division below, then the pattern repeated for the next book reviews.
Thank you for your help.

 

egibberate

5+ Year Member



 
Msg#: 3828020 posted 6:21 pm on Jan 17, 2009 (gmt 0)

Hi,
I have solved this problem, thank you to anyone who read the question.

httpwebwitch

WebmasterWorld Administrator httpwebwitch us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3828020 posted 8:57 pm on Jan 17, 2009 (gmt 0)

would you post what your solution was? that will be helpful for people who find this thread in the future.

egibberate

5+ Year Member



 
Msg#: 3828020 posted 8:02 pm on Jan 20, 2009 (gmt 0)

Sorry httpwebwitch, how rude of me!
I incorrectly had the division tags outside of the for-each tags.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved