Click here to Skip to main content
15,912,756 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionHow to insert Comma between templates Pin
Sushant_Mathur28-Oct-07 23:29
Sushant_Mathur28-Oct-07 23:29 
AnswerRe: How to insert Comma between templates Pin
George L. Jackson29-Oct-07 1:45
George L. Jackson29-Oct-07 1:45 
GeneralRe: How to insert Comma between templates Pin
Sushant_Mathur29-Oct-07 2:41
Sushant_Mathur29-Oct-07 2:41 
GeneralRe: How to insert Comma between templates Pin
George L. Jackson29-Oct-07 3:00
George L. Jackson29-Oct-07 3:00 
GeneralRe: How to insert Comma between templates Pin
George L. Jackson29-Oct-07 3:39
George L. Jackson29-Oct-07 3:39 
GeneralRe: How to insert Comma between templates Pin
Sushant_Mathur29-Oct-07 3:48
Sushant_Mathur29-Oct-07 3:48 
QuestionProblem recognizing charcter entities Pin
Zoltan Aszalos28-Oct-07 21:41
Zoltan Aszalos28-Oct-07 21:41 
AnswerRe: Problem recognizing charcter entities Pin
George L. Jackson29-Oct-07 3:06
George L. Jackson29-Oct-07 3:06 
GeneralRe: Problem recognizing charcter entities Pin
Zoltan Aszalos29-Oct-07 4:22
Zoltan Aszalos29-Oct-07 4:22 
QuestionConvert MS Excel file to XML file Pin
sonigirish28-Oct-07 18:56
sonigirish28-Oct-07 18:56 
AnswerRe: Convert MS Excel file to XML file Pin
Paul Conrad4-Nov-07 7:58
professionalPaul Conrad4-Nov-07 7:58 
Questiongetting element [modified] Pin
RussBus25-Oct-07 12:30
RussBus25-Oct-07 12:30 
AnswerRe: getting element Pin
George L. Jackson25-Oct-07 13:15
George L. Jackson25-Oct-07 13:15 
GeneralRe: getting element Pin
RussBus26-Oct-07 4:32
RussBus26-Oct-07 4:32 
AnswerRe: getting element Pin
pmarfleet26-Oct-07 7:48
pmarfleet26-Oct-07 7:48 
GeneralRe: getting element Pin
RussBus26-Oct-07 7:54
RussBus26-Oct-07 7:54 
AnswerRe: getting element Pin
George L. Jackson26-Oct-07 9:30
George L. Jackson26-Oct-07 9:30 
Your context node is attribute; thus, you're printing its name. You want to print out the children elements name. It you just want to print out the first child's name:

<xsl:value-of select="child::*[position()=1]"/>

Given this XML document:

<?xml version='1.0'?>
<report>
<attribute>
<ColumnID>TestColumID</ColumnID>
<TableName>Assignment</TableName>
<ColumnName>Delta</ColumnName>
<DataType>System.Double</DataType>
<ColumnUsage>OutputColumn</ColumnUsage>
<ValueType>Single</ValueType>
<DisplayTitle>Adherence Delta</DisplayTitle>
<TypeId>ReportDatabaseColumnAttribute</TypeId>
</attribute>
</report>

here is an example of what you are trying to do except it prints out all children names:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table>
<xsl:for-each select="report/attribute">
<tr>
<xsl:for-each select="child::*">
<td><xsl:value-of select="name()"/></td>
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

"We make a living by what we get, we make a life by what we give." --Winston Churchill

Questionxml with crystal reports Pin
sreenivasaraok25-Oct-07 2:09
sreenivasaraok25-Oct-07 2:09 
Questionxml values to database Pin
KarthikMano24-Oct-07 19:40
KarthikMano24-Oct-07 19:40 
QuestionHow to extract specific data values from xml using VC++ [modified] Pin
zxc8924-Oct-07 1:31
zxc8924-Oct-07 1:31 
AnswerRe: How to extract specific data values from xml using VC++ Pin
Stefan Troschuetz24-Oct-07 2:30
Stefan Troschuetz24-Oct-07 2:30 
AnswerRe: How to extract specific data values from xml using VC++ Pin
Nathan Holt at EMOM24-Oct-07 6:35
Nathan Holt at EMOM24-Oct-07 6:35 
GeneralProblem with SelectNodes [modified] Pin
Brady Kelly23-Oct-07 5:08
Brady Kelly23-Oct-07 5:08 
GeneralRe: Problem with SelectNodes Pin
pmarfleet23-Oct-07 5:34
pmarfleet23-Oct-07 5:34 
GeneralRe: Problem with SelectNodes Pin
Brady Kelly23-Oct-07 5:37
Brady Kelly23-Oct-07 5:37 

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.