You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Sebastian Tennant <se...@smolny.plus.com> on 2006/01/07 18:26:40 UTC
Simple XML to HTML XSLT question
Hi all,
Why doesn't this work?
Code snippet from XML file:
<page>
<leftCol><item>Hello</item></leftCol>
<leftCol><item>Goodbye</item></leftCol>
</page>
Code snippets from XSL file:
<tr>
<td align="right">
<xsl:apply-templates select="/page/leftCol/*" />
</td>
</tr>
[...]
<xsl:template match="leftCol">
<xsl:value-of select="item" /><br />
</xsl:template>
I want to create a table data element with 'hello' and 'goodbye' on
separate lines, like this:
Hello
Goodbye
... instead the table data element is displayed like this:
HelloGoodbye
... so for some reason the break tag is not getting through, or at least
Mozilla Firefox refuses to display it this way.
Any tips for an XML/XSL newbie anyone?
TIA
sdt
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
Re: Simple XML to HTML XSLT question
Posted by Sebastian Tennant <se...@smolny.plus.com>.
Andreas L Delmelle <a_...@pandora.be> wrote:
> Note: this isn't actually the right list to pose questions like
> these. Try Mulberry's XSLT List in the future.
Thanks for the tip. I will post to Mulberry's list in the future. And
thanks for answering my question while you were about it.
sdt
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org
Re: Simple XML to HTML XSLT question
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 7, 2006, at 18:26, Sebastian Tennant wrote:
Hi,
Note: this isn't actually the right list to pose questions like
these. Try Mulberry's XSLT List in the future.
> Why doesn't this work?
>
> Code snippets from XSL file:
>
> <tr>
> <td align="right">
> <xsl:apply-templates select="/page/leftCol/*" />
> </td>
> </tr>
>
> [...]
>
> <xsl:template match="leftCol">
> <xsl:value-of select="item" /><br />
> </xsl:template>
The latter template never gets applied, unless you make the former:
<xsl:apply-templates select="/page/leftCol" />
HTH!
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org