Click here to Skip to main content
15,895,667 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: xsd schema cascading Pin
George L. Jackson8-Nov-06 12:20
George L. Jackson8-Nov-06 12:20 
GeneralRe: xsd schema cascading Pin
Russell Jones21-Nov-06 3:43
Russell Jones21-Nov-06 3:43 
QuestionXSLT:copy-of element Pin
ybasha2-Nov-06 5:21
ybasha2-Nov-06 5:21 
QuestionXSLT:copy-of Pin
ybasha2-Nov-06 5:15
ybasha2-Nov-06 5:15 
AnswerRe: XSLT:copy-of Pin
Dustin Metzgar2-Nov-06 5:24
Dustin Metzgar2-Nov-06 5:24 
GeneralRe: XSLT:copy-of Pin
ybasha2-Nov-06 5:30
ybasha2-Nov-06 5:30 
QuestionCreate anchors in an XHTML document generated with XSLT Pin
ISmith30-Oct-06 7:47
ISmith30-Oct-06 7:47 
AnswerRe: Create anchors in an XHTML document generated with XSLT Pin
George L. Jackson30-Oct-06 13:53
George L. Jackson30-Oct-06 13:53 
I made some changes to your xml document:

<list>
<items letter="A">
<item name="First A-Item Name">
<description>The description of this item which has a name that begins with 'A'.</description>
</item>
<item name="Second A-Item Name">
<description>The description of another item which has a name that begins with 'A'.</description>
</item>
</items>
<items letter="B">
<item name="First B-Item Name">
<description>The description of this item which has a name that begins with 'B'.</description>
</item>
<item name="Second B-Item Name">
<description>The description of another item which has a name that begins with 'B'</description>
</item>
</items>
</list>

Here is my XSLT code that produces what you may want:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>Alpha-Anchor</title>
</head>
<body>
<table cellpadding="3">
<tr>
<xsl:apply-templates select="list/items/@letter"/>
</tr>
</table>
<div style="height: 800pt"></div>
<xsl:apply-templates select="list/items"/>
</body>
</html>
</xsl:template>
<xsl:template match="@letter">
<td><a href="#{.}"><xsl:value-of select="."/></a></td>
</xsl:template>
<xsl:template match="items">
<div id="{@letter}">
<xsl:apply-templates select="item"/>
</div>
<div style="height: 400pt"></div>
</xsl:template>
<xsl:template match="item">
<table>
<tr>
<td><xsl:value-of select="@name"/></td>
</tr>
<tr>
<td><xsl:value-of select="description"/></td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
GeneralRe: Create anchors in an XHTML document generated with XSLT Pin
ISmith31-Oct-06 6:16
ISmith31-Oct-06 6:16 
QuestionWeb Service needed for Sharepoint Pin
dgibson553130-Oct-06 3:08
dgibson553130-Oct-06 3:08 
QuestionInsert one value in XSLT file Pin
shapper27-Oct-06 9:00
shapper27-Oct-06 9:00 
AnswerRe: Insert one value in XSLT file Pin
Dustin Metzgar27-Oct-06 9:17
Dustin Metzgar27-Oct-06 9:17 
Questionxpath during xsl transfomation Pin
Savas Cilve27-Oct-06 4:24
Savas Cilve27-Oct-06 4:24 
AnswerRe: xpath during xsl transfomation Pin
led mike27-Oct-06 5:16
led mike27-Oct-06 5:16 
QuestionRe: xpath during xsl transfomation Pin
Savas Cilve27-Oct-06 5:19
Savas Cilve27-Oct-06 5:19 
AnswerRe: xpath during xsl transfomation Pin
led mike27-Oct-06 5:45
led mike27-Oct-06 5:45 
AnswerRe: xpath during xsl transfomation Pin
Dustin Metzgar27-Oct-06 8:05
Dustin Metzgar27-Oct-06 8:05 
GeneralRe: xpath during xsl transfomation Pin
Savas Cilve30-Oct-06 1:15
Savas Cilve30-Oct-06 1:15 
GeneralRe: xpath during xsl transfomation Pin
Dustin Metzgar1-Nov-06 5:16
Dustin Metzgar1-Nov-06 5:16 
GeneralRe: xpath during xsl transfomation Pin
Savas Cilve1-Nov-06 5:28
Savas Cilve1-Nov-06 5:28 
GeneralRe: xpath during xsl transfomation Pin
Dustin Metzgar1-Nov-06 10:32
Dustin Metzgar1-Nov-06 10:32 
QuestionIgnore whitespace problem while reading XML file Pin
biglewy26-Oct-06 1:22
biglewy26-Oct-06 1:22 
AnswerRe: Ignore whitespace problem while reading XML file Pin
led mike26-Oct-06 9:12
led mike26-Oct-06 9:12 
AnswerRe: Ignore whitespace problem while reading XML file Pin
Michael Dunn26-Oct-06 16:16
sitebuilderMichael Dunn26-Oct-06 16:16 
GeneralRe: Ignore whitespace problem while reading XML file Pin
biglewy26-Oct-06 20:12
biglewy26-Oct-06 20:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.