Subject: Re: [xsl] creating list from structured paragraphs From: Antonio Fiol Bonnín <fiol@xxxxxxxxxx> Date: Mon, 20 May 2002 07:55:39 +0200 |
<xsl:template match="para-1"> <list-item> <xsl:value-of select="."> </list-item> </xsl:template>
<xsl:template match="para"> <para> <xsl:value-of select="."> <list> <xsl:apply-templates /> </list> </para> </xsl:template>
I'm hoping this is simple. Here is the XML:
<doc> <para>The following text is a list <para-1>List item No. 1</para-1> <para-1>List item No. 2</para-1> <para-1>List item No. 3</para-1> </para> </doc>
I need:
<doc> <para>The following text is a list <list> <list-item>List item No. 1</list-item> <list-item>List item No. 2</list-item> <list-item>List item No. 3</list-item> </list> </para> </doc>
I'd cut and paste my XSL but it doesn't work so I felt it not worth the bandwidth.
It should also be noted that I do have influence over the XML to an extent. I can remove the parent-child relationship so that the XML looks like this:
<doc> <para>The following text is a list</para> <para-1>List item No. 1</para-1> <para-1>List item No. 2</para-1> <para-1>List item No. 3</para-1> </doc>
but it didn't bring me closer to a solution. Any help would be much appreciated.
thanks
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] creating list from structured, David Santamauro | Thread | RE: [xsl] creating list from struct, David Santamauro |
Re: [xsl] Inserting a parent node., Chuck White | Date | Re: [xsl] creating list from struct, Roma Yankin |
Month |