Jump to content

Aspert

Members
  • Posts

    6
  • Joined

  • Last visited

Aspert's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Aspert

    Swap image

    Sorry, I guess I'm the one who explained it wrong. I didn't mean the javascript but what I meant was your code <table> <xsl:for-each select="horse/*"> <tr> <th style="color:#65102D;" width="150" align="left" scope="row"> <xsl:value-of select="name()"/> </th> <td style="font-weight:bold;" colspan="2"> <xsl:value-of select="."/> </td> </tr> </xsl:for-each></table> Please have a look at http://www.stalverhoeven.nl/xml/aangeboden_nl.xml (and ofcourse then the xsl that goes with it: http://www.stalverhoeven.nl/xml/template_aangeboden_nl.xsl ).It works ok with my horrible long table as used in this combination: http://www.stalverhoeven.nl/xml/aangeboden.xml and http://www.stalverhoeven.nl/xml/template_a...oden_engels.xsl. I used this long messy code because it is used like that in the xslt tutorial of w3schools, and I didn't see a lesson anywhere explaining your above mentioned code, which ofcourse would be very handy to know (if I'd get it to work...). Maybe all the /*, name() and "." stuff is only very natural when one is a programmer, but guess what, I'm not...
  2. Aspert

    Swap image

    Thanks both for your input.As I tried to explain in my post of Jan 30, I would like to, but can't get the short code kvnmck18 gave me get to work. The sloppy code (see post of Jan 30) works, but the tidy code I can't get to work. For the latter have a look at http://www.stalverhoeven.nl/xml/aangeboden_nl.xml.What am I doing wrong?Btw: I really like the CSSPlay.co.uk site, thank you very much!
  3. Aspert

    Swap image

    ok, i'll just give u the url's then: at http://www.stalverhoeven.nl/xml/aangeboden.xml you can find the result of the mess. i've tried changing the xslt code between the <table> tags before, with the code kvnmck18 gave me, but the result is that everything below the text "Prijzen op aanvraag." stays empty.what i'm trying to do here is making it like this: http://www.stalverhoeven.nl/xml/rollover.htm
  4. Aspert

    Swap image

    Hi. Nice of you to look into my post!No, "film" is not thumbnails.The last 3 table rows (with 2 cells each) are like: -1st: empty cell; cell with 4 thumbnails.-2nd: cell with description "Big Photo"; cell where enlarged photo of one of the 4 thumbnails should come. Default <foto1> should be visible when the page is opened.-3rd: cell with description "Film"; cell with a link to open a little window where a movie is displayed. How to do this, is my second problem, but the thumbnail question has my priority.I hope my talent for xslt is bigger than my talent for server scripts. But always willing to learn.About your code I have questions:- What means or does the * in <xsl:for-each select="horse/*"> ?- What does <xsl:value-of select="name()"/> do? Is it a way to make my description in the table header (first column of the table) variable? Or should i fill in one of the xml tags where you put "name" or put something between the brackets?- <xsl:value-of select="."/> : I put a xml tagname "." between the quotes or where te dot is?I've played around with your code and couldn't get it to work, see...And I'm not sure what you mean with: "Just have to limit the "foto" and ect. Limit it to first 8 positions". English is not my first language, so maybe if you reapeat it slooooowwwlyyyy I will understand eventually. From one member to another (read: nitwit member to 'used to be advanced' member): thanks in advance!
  5. Hi,I'm new at this forum too, but I think they like you to put code between the code brackets (#icon in editor) and furthermore it might be handy to also copy the xml-file with the question.Hope you'll get a useful answer from someone.
  6. Aspert

    Swap image

    i've just discovered xml en xslt, and made the following xml (thanks to a lot of help from the w3schools tutorials!): <?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="template_aangeboden_engels.xsl"?><aangeboden> <horse> <pedigree>Karandasj x Pilot x Salute</pedigree> <naam>Parandass</naam> <geboortedatum>9-apr-1997</geboortedatum> <kleur>Zwart</kleur> <geslacht>Ruin</geslacht> <stokmaat>1,66</stokmaat> <niveau>1,20</niveau> <omschrijving>Zeer fijn te rijden. Ideaal amateurpaard. Voorzichtig, vermogen en springt met goede techniek. Klinisch en röntgenologisch 100%.</omschrijving> <foto1>../images/jadorijke.jpg</foto1> <foto2>../images/larisa.jpg</foto2> <foto3>../images/Lavito.jpg</foto3> <foto4>../images/pixel.gif</foto4> <film>Lavito.AVI</film> </horse> <horse> <pedigree>Laptop x Grannus x Cill xx</pedigree> <naam>La Dolce Vita</naam> <geboortedatum>15-apr-2001</geboortedatum> <kleur>Donkerbruin</kleur> <geslacht>Merrie</geslacht> <stokmaat>1,62</stokmaat> <niveau>1,10</niveau> <omschrijving>Zeer fijn te rijden. Maakt wissels, is zeer voorzichtig en springt met goede techniek. Klinisch en röntgenologisch 100%.</omschrijving> <foto1>../images/Lavito.jpg</foto1> <foto2>../images/jadorijke.jpg</foto2> <foto3>../images/larisa.jpg</foto3> <foto4>../images/larisa.jpg</foto4> <film>Lavito.AVI</film> </horse> <horse> <pedigree>Concorde x Indoctro</pedigree> <naam>Terlette</naam> <geboortedatum>17-apr-2000</geboortedatum> <kleur>Bruin</kleur> <geslacht>Merrie</geslacht> <stokmaat>1,66</stokmaat> <niveau>1,20</niveau> <omschrijving>Springt zeer fijn. Terlette komt uit een bewezen stam waar meerdere internationale springpaarden uit komen. Zeer patente merrie waar wij veel verwachtingen van hebben voor de toekomst. Klinisch en röntgenologisch 100%.</omschrijving> <foto1>../images/larisa.jpg</foto1> <foto2>../images/Lavito.jpg</foto2> <foto3>../images/pixel.gif</foto3> <foto4>../images/pixel.gif</foto4> <film>Lavito.AVI</film> </horse> <horse> <pedigree>Karandasj x Pilot x Salute</pedigree> <naam>Parandass</naam> <geboortedatum>9-apr-1997</geboortedatum> <kleur>Zwart</kleur> <geslacht>Ruin</geslacht> <stokmaat>1,66</stokmaat> <niveau>1,20</niveau> <omschrijving>Zeer fijn te rijden. Ideaal amateurpaard. Voorzichtig, vermogen en springt met goede techniek. Klinisch en röntgenologisch 100%.</omschrijving> <foto1>../images/jadorijke.jpg</foto1> <foto2>../images/larisa.jpg</foto2> <foto3>../images/Lavito.jpg</foto3> <foto4>../images/pixel.gif</foto4> <film>Lavito.AVI</film> </horse></aangeboden> i made the following xsl file to go with it (and it works great!): <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <html> <body style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10pt; background-color:#FFFFFF; background-image:url(../img/4.jpg); background-repeat:no-repeat; background-attachment:fixed; background-position:right;" alink="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF"><p align="center"><img src="../img/aangeboden.gif" width="184" height="19" /></p><p /><p align="left">Onderstaand vindt u diverse paarden die voor verkoop in aanmerking komen.<br /> Deze paarden zijn allemaal röntgenologisch en klinisch 100% in orde en wij staan garant voor de kwaliteit van deze paarden. Prijzen op aanvraag.</p><br /> <xsl:for-each select="aangeboden/horse"><table align="center" width="472" cellpadding="2" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10pt; border-color: #FF9900 #FFFFFF #FFFFFF #FF9900; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px"> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Pedigree</th> <td style="font-weight:bold;" colspan="2"><xsl:value-of select="pedigree"/></td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Naam</th> <td style="font-weight:bold;" colspan="2"><xsl:value-of select="naam"/></td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Geboortedatum</th> <td colspan="2"><xsl:value-of select="geboortedatum"/></td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Kleur</th> <td colspan="2"><xsl:value-of select="kleur"/></td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Geslacht</th> <td colspan="2"><xsl:value-of select="geslacht"/></td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Stokmaat</th> <td colspan="2"><xsl:value-of select="stokmaat"/> m</td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Niveau</th> <td colspan="2"><xsl:value-of select="niveau"/> m</td> </tr> <tr> <th style="color:#65102D;" width="150" align="left" valign="top" scope="row">Omschrijving</th> <td colspan="2"><xsl:value-of select="omschrijving"/></td> </tr> <tr> <td width="150"> </td><td colspan="2"><a> <xsl:attribute name="href"> <xsl:value-of select= "link" /> </xsl:attribute> <img vspace="2" width="60" height="60"> <xsl:attribute name="src"> <xsl:value-of select= "foto1" /> </xsl:attribute> </img> </a> <a> <xsl:attribute name="href"> <xsl:value-of select= "link" /> </xsl:attribute> <img vspace="2" width="60" height="60"> <xsl:attribute name="src"> <xsl:value-of select= "foto2" /> </xsl:attribute> </img> </a> <a> <xsl:attribute name="href"> <xsl:value-of select= "link" /> </xsl:attribute> <img vspace="2" width="60" height="60"> <xsl:attribute name="src"> <xsl:value-of select= "foto3" /> </xsl:attribute> </img> </a> <a> <xsl:attribute name="href"> <xsl:value-of select= "link" /> </xsl:attribute> <img vspace="2" width="60" height="60"> <xsl:attribute name="src"> <xsl:value-of select= "foto4" /> </xsl:attribute> </img> </a></td></tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Big photo</th> <td colspan="2"></td> </tr> <tr> <th colspan="3" align="left" scope="row"> </th> </tr> <tr> <th style="color:#65102D;" width="150" align="left" scope="row">Film</th> <td colspan="2"><xsl:value-of select="film"/></td> </tr></table><br /><br /><br /> </xsl:for-each> </body> </html></xsl:template></xsl:stylesheet> but i would like for the thumbnails to open an enlargement of these thumbnails on the table cell underneath the thumnails. i have tried all kinds of things, but i'm just not familiair enough with xml/xslt (or javascript, for that matter. normally dreamwaver takes care of that for me...).all kind of help/remarks would be very welcome to solve this. (i wonder, can it be done without javascript? i would prefer that.) thanks in advance!
×
×
  • Create New...