jacy_m
asked on
xsl syntax question
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=xs l: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="-//WAPFORU M//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:</xs l:text><xs l:value-of select="//category"/></p>
<p><xsl:text>Id:</xsl:text ><xsl:valu e-of select="//pageid"/></p>
<p><xsl:text>Published:</x sl:text><x sl:value-o f 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/hardli nk">
<p><a>
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attri bute>
<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">Li ked 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>
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=xs
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="-//WAPFORU
<xsl:template match="/">
<wml>
<card id="Node" title="Node">
<p><xsl:value-of select="//title"/></p>
<p><xsl:text>Author:</xsl:
<p><xsl:text>Category:</xs
<p><xsl:text>Id:</xsl:text
<p><xsl:text>Published:</x
<p><xsl:text></xsl:text></
<p><xsl:value-of select="//content"/></p>
<p><xsl:text>Hard-Links:</
<xsl:for-each select="//hardlinks/hardli
<p><a>
<xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attri
<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">Li
<p><a><xsl:attribute name="href"><a href="page.jsp?vote=down">
</card>
</wml>
</xsl:template>
</xsl:stylesheet>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<a><xsl:attribute name="href">page.jsp?vote=