Subject: [xsl] splitting the content at each and every element From: Ganesh Babu N <nbabuganesh@xxxxxxxxx> Date: Wed, 27 May 2009 18:36:37 +0530 |
Dear All, My input : <article> <para>Countering misinformation <bold>about</bold> vaccines has become an urgent priority to assure the continued success of immunization programs. Fortunately, parents continue to seek information as well as the means to validate what they find. They also are seeking to identify trusted health providers to give them more information and guidance.</para> </article> Required output: <text> <parastyle> <characterstyle style="para"> <content>Countering misinformation</content> </characterstyle> <characterstyle type="bold"> <content>about</content> </characterstyle> <characterstyle type="para"> <content> vaccines has become an urgent priority to assure the continued success of immunization programs. Fortunately, parents continue to seek information as well as the means to validate what they find. They also are seeking to identify trusted health providers to give them more information and guidance</content> </characterstyle> </parastyle> </text> My XSL: <xsl:template match="/"> <text> <xsl:apply-templates/> </text> </xsl:template> <xsl:template match="para"> <parastyle> <characterstyle type="{name()}"> <content> <xsl:apply-templates/> </content> </characterstyle> </parastyle> </xsl:template> <xsl:template match="bold"> <characterstyle type="{name()}"> <content> <xsl:apply-templates/> </content> </characterstyle> </xsl:template> XSL Output: <text> <parastyle> <characterstyle style="para"> <content>Countering misinformation <characterstyle type="bold"> <content>about</content> </characterstyle> <content> vaccines has become an urgent priority to assure the continued success of immunization programs. Fortunately, parents continue to seek information as well as the means to validate what they find. They also are seeking to identify trusted health providers to give them more information and guidance</content> </characterstyle> </parastyle> </text> My problem is how to split the file at each element it encountered. it may not be single bold, any number of tags may come inside the para element. Please suggest how to split the content at each element. Regards, Ganesh
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Issues using keys to find, Kamlesh Bafna | Thread | Re: [xsl] splitting the content at , Martin Honnen |
Re: [xsl] Number check in multiple , Martin Honnen | Date | Re: [xsl] splitting the content at , Martin Honnen |
Month |