www.webdeveloper.com
Results 1 to 3 of 3

Thread: XML and XSLT in Dreamweaver

Hybrid View

  1. #1
    Join Date
    Jul 2009
    Posts
    11

    XML and XSLT in Dreamweaver

    Hey all-

    Since using Dreamweaver's functionality for XML, I've noticed a few quirks here and there. Here's my biggest issue so far:

    onMouseOver events are not functioning correctly in Firefox. I'm trying to dynamically create an image gallery with XML and XSLT. I have the files linked up with everything displaying more or less as I want it. but when I create an onMouseOver event for an image, and try to reference nodes in my XML file for the inputs for the event, they do not function in Firefox. Everything works fine in IE, however.

    Any info would be appreciated. Thanks!

    Here's a link to the site.

    http://www.topmarkconstruction.com/customHomes.xml
    Last edited by Alive; 09-13-2009 at 06:05 PM. Reason: linked directly to page in discussion

  2. #2
    Join Date
    Jul 2009
    Posts
    11
    Here's my current code:

    This is the line that I think is causing issues (line 7, below):
    Code:
    <img src="{source}" width="100" height="100" onmouseover="MM_swapImage('{../mainImageName}','','{source}',1)" />
    XSL/HTML
    Code:
          <xsl:for-each select="category/project">
          <hr width="80%" size="1px" color="#999999" />
          <table width="100%" border="0" cellspacing="2" cellpadding="2">
          <tr>
          <xsl:for-each select="image">
          <td><a href="{source}">
          <img src="{source}" width="100" height="100" onmouseover="MM_swapImage('{../mainImageName}','','{source}',1)" />
          </a></td>
          </xsl:for-each>
          </tr>
          </table>
    		<table width="100%" border="0" cellspacing="2" cellpadding="2">
            <tr align="left">
              <td height="12" valign="top"><xsl:value-of select="name"/></td>
              <td rowspan="3" align="right" width="550">
              <a href="{image/source}"><img src="{image/source}" name="{mainImageName}" width="550" /></a>
              </td>
            </tr>
            <tr align="left">
              <td height="12" valign="top">Location: <xsl:value-of select="location"/></td>
            </tr>
            <tr align="left">
              <td valign="top"><xsl:value-of select="caption"/></td>
            </tr>
    
          </table>
          </xsl:for-each>
    XML
    Code:
        <category name="Custom Homes">
    	<project>
    		<name>Project Name 1</name>
    		<beginMonth>Jan</beginMonth>
    		<beginYear>01</beginYear>
    		<endMonth>Dec</endMonth>
    		<endYear>03</endYear>
    		<location>San Diego</location>
    		<mainImageName>projectName1</mainImageName>
            	<image>
    			<title>boa01</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<image>
    			<title>boa02</title>
    			<source>images/pictures/building.jpg</source>
    		</image>
            	<image>
    			<title>boa03</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<image>
    			<title>boa04</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<image>
    			<title>boa05</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<caption>This is a caption.</caption>
    	</project>
    
    	<project>
    		<name>dillydally</name>
    		<beginMonth>Jan</beginMonth>
    		<beginYear>01</beginYear>
    		<endMonth>Dec</endMonth>
    		<endYear>03</endYear>
    		<location>wherever</location>
    		<mainImageName>mainImage2</mainImageName>
            	<image>
    			<title>boa</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<image>
    			<title>boa</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
    		<image>
    			<title>boa</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
    		<image>
    			<title>boa</title>
    			<source>images/pictures/boa.jpg</source>
    		</image>
            	<caption>This is a caption.</caption>
    	</project>
        </category>

  3. #3
    Join Date
    Jul 2009
    Posts
    11
    bump...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles