Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • [email protected] 30 posts 42 karma points
    Dec 20, 2010 @ 22:22
    r_lamb@hotmail.com
    0

    XSLT macro is removing my link tag?

    I have a simple xslt that has the following markup:

    <class="more">
       <href="/test.aspx">test</a>
    </p>

    But when the xslt is outputted on the screen, it results in this:

    <p class="more"><span></span></p>

    Can someone explain how I can get around this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 20, 2010 @ 22:37
    Jan Skovgaard
    0

    Hi

    Can you perhaps post the whole XSLT code instead of just the HTML snippet? Then it might be easier to investigate what is happening.

    /Jan

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Dec 20, 2010 @ 23:15
    Chriztian Steinmeier
    0

    Hi,

    This is definitely not something that that snippet of XSLT would ever do — do you perhaps have some JavaScript that manipulates the links?

    /Chriztian

     

  • [email protected] 30 posts 42 karma points
    Dec 21, 2010 @ 00:01
    r_lamb@hotmail.com
    0

    Here is the url so we can see it happening: http://umbraco.gobrainspark.com/ Just look for the test in firebug or the source. Here is the xslt as well. Thanks!

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
      version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">

    <!-- start writing XSLT -->
    <ul class="home-slider">
          

      <xsl:if test="$currentPage/featuredWork1 != ''">
        <xsl:variable name="work1" select="umbraco.library:GetXmlNodeById($currentPage/featuredWork1)"/>
        <xsl:if test="$work1/slideImage != '' and $work1/slideHeadlineImage !=''">
          <xsl:variable name="slidemedia1" select="umbraco.library:GetMedia($work1/slideImage, 0)" />
          <xsl:variable name="headmedia1" select="umbraco.library:GetMedia($work1/slideHeadlineImage, 0)" />
          

                <li>
                
                  <div class="geoeye">
                    <img src="/resources/img/img_hm-geoeye.jpg" />
                        <div class="overlay">
                            <h1>Science Technology</h1>
                            <p>GeoEye is part of a scientific and technological revolution, where geospatial mapping is rapidly changing how we   
                            understand our planet and each other.</p>   
                            <p>BrainSpark has helped bring these exciting new technologies to life online.</p>
                          <class="more">
                            <href="/test.aspx">test</a>
                          </p>
                        </div>
                        
                  </div>
                    
          </li>
        </xsl:if>
                

                
      </xsl:if>

    </ul>
    </xsl:template>

    </xsl:stylesheet>

  • [email protected] 30 posts 42 karma points
    Dec 21, 2010 @ 00:05
    r_lamb@hotmail.com
    0

    I think is a javascript issue now that you mention it. Thanks for the idea!

Please Sign in or register to post replies

Write your reply to:

Draft