Solved

xsl syntax question

Posted on 2001-06-08
2
311 Views
Last Modified: 2008-03-06
Hi,
I have the following code, all of which works fine except for the links down the bottom (underneath cast your vote). I dont really know if I can do this or not. I want the links to be hard coded (not coming out of any of the xml stuff). I didnt write the rest of the code, I am just trying to edit it and am not sure what I am doing... Oh I am writing it in WML

I would actually like the link to be
page.jsp?vote=up&target=xsl:value-of select="//pageid"/>
but i dont know how to concatenate xml and static values

Pls Help! thanks


<?xml version="1.0"?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml"
        doctype-system ="http://www.wapforum.org/DTD/wml_1.1.xml"
        doctype-public="-//WAPFORUM//DTD WML 1.1//EN"/>
   <xsl:template match="/">

     <wml>
     <card id="Node" title="Node">

           <p><xsl:value-of select="//title"/></p>
     
          <p><xsl:text>Author:</xsl:text><xsl:value-of select="//author"/></p>
          <p><xsl:text>Category:</xsl:text><xsl:value-of select="//category"/></p>
          <p><xsl:text>Id:</xsl:text><xsl:value-of select="//pageid"/></p>
          <p><xsl:text>Published:</xsl:text><xsl:value-of select="//datepublished"/></p>
       
         <p><xsl:text></xsl:text></p>
         <p><xsl:value-of select="//content"/></p>
         
         <p><xsl:text>Hard-Links:</xsl:text></p>
         <xsl:for-each select="//hardlinks/hardlink">
               <p><a>
               <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
               <xsl:value-of select="label"/>
               </a></p>
        </xsl:for-each>

          <p><xsl:text>Cast your Vote</xsl:text></p>
          <p><a><xsl:attribute name="href"><a href="page.jsp?vote=up">Liked It</xsl:attribute></a></p>
          <p><a><xsl:attribute name="href"><a href="page.jsp?vote=down">Disliked It</xsl:attribute></a></p>


     </card>
     </wml>

    </xsl:template>
</xsl:stylesheet>

0
Comment
Question by:jacy_m
2 Comments
 
LVL 12

Expert Comment

by:ahosang
ID: 6167770
Something like :
<a><xsl:attribute name="href">page.jsp?vote=up&target=<xsl:value-of select="//pageid"/></xsl:attribute>Liked It</a>
0
 
LVL 3

Accepted Solution

by:
dragosh earned 100 total points
ID: 6167902
actually is like this : you can't use '&' character in an XML file:

<a><xsl:attribute name="href">page.jsp?vote=up&amp;target=<xsl:value-of select="//pageid"/></xsl:attribute>Liked
It</a>

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jaxb jaxp sax dom 7 43
Macro which export an xml file to Outlook every day 18 86
D3, SVG, dragging a star. 2 108
PHP and Soap 3 27
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now