Click here to Skip to main content
15,889,877 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: "Pretty" indentation of output using SQLXML managed classes? Pin
Stefan Troschuetz1-Nov-07 21:57
Stefan Troschuetz1-Nov-07 21:57 
GeneralRe: "Pretty" indentation of output using SQLXML managed classes? Pin
pmarfleet1-Nov-07 23:50
pmarfleet1-Nov-07 23:50 
GeneralRe: "Pretty" indentation of output using SQLXML managed classes? Pin
pmarfleet2-Nov-07 7:17
pmarfleet2-Nov-07 7:17 
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 
Okay, if you are trying to place a comma between each "apply-templates" call, I would put the comma in the template being called:

XML:

<?xml version="1.0" encoding="utf-8" ?>
<colors>
<color>Red</color>
<color>Green</color>
<color>Black</color>
</colors>

XSLT:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<head>
<title>Comma Delimited</title>
</head>
<body>
<div>
<xsl:apply-templates select="colors/color"/>
</div>
</body>
</html>
</xsl:template>

<xsl:template match="color">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">
<xsl:text>,&#160;</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>


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

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 
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 

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.