File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Keyword xsl:output may not be used here.

 
Pardha
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I could add some hyperlinks with ids so that in same page I can nevigate..
But it is not working..
****************
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
****************
in the above code snippet I could not get the value of {@id}???
and when I add xsl utput tag then it raised the following error
"Keyword xsl utput may not be used here. " what might be the reasong...
Thanks in advance
Saradhi....

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="">
<xsl utput method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match = "/">
<html>
<body>
<h2> Juicers Example </h2>
<table border="1">
<tr>
<td>Jucers</td>
<td>Cost</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<A href="#{@id}-DESCRIPTION" name="{@id}-COST">
<xsl:value-of select="name"/>
</A>
</td>
<td>

$ <xsl:value-of select="cost[@currency='USD']"/>
</td>
</tr>
</xsl:for-each>

</table>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/>
<table border="1" width="100%">
<tr>
<td>Jucers</td>
<td>Description</td>
</tr>
<xsl:for-each select="/juicers/juicer">
<tr>
<td>
<a href="#{@id}-COST" name="{@id}-DESCRIPTION">
<xsl:value-of select="name"/>
</a>
</td>
<td>
<xsl:value-of select="description"/>
</td>
</tr>
</xsl:for-each>
</table>


</body>
</html>
</xsl:template>
</xsl:stylesheet>
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only reason for complaining about <xslutput> in that particular place is that the WD-xsl namespace you're using does not support it.
Once you change your <xsl:stylesheet> element to look like this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
it should work just fine.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic