[Home] [By Thread] [By Date] [Recent Entries]
Hi everyone
I need to generate a XHTML page similar to the one presented below. (I know it is wrong use of CDATA but I was unable generate some tages that are presented in the required xhtml page) /* ---- xhtml to be generated <s:div StyleClass ="block_c_1"><p> <b>Welcome Zeeshan!</b><br /> <br /> <b>DOB: </b>August 20 1979 <br /> <br /> <b>We are committed to provide an enlightening and safe environment to all convention attendees.<br /> <br /></b> <b>Site: Saroba Garden Lahore </b><br /> <br /> </p> </s:div> --- xhtml generated <s:div StyleClass ="block_c_1"><p><br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <b>Welcome Zeeshan!</b> <b>DOB: </b> <b>We are committed to provide an enlightening and safe environment to all convention attendees.</b> <b>Site: Saroba Garden Lahore </b></p> </s:div> --- xml used <DIVS StyleClass="block_c_1" > <PG> <B>Welcome Zeeshan!</B> <BREAK /><BREAK /> <B>DOB: </B>August 20 1979<BREAK /><BREAK /> <B>We are committed to provide an enlightening and safe environment to all convention attendees.</B><BREAK /><BREAK /> <B>Site: Saroba Garden Lahore </B> <BREAK /><BREAK /> </PG> </DIVS> ------- xslt (I know it is wrong use of CDATA but I was unable generate the tages that are presented in the req xhtml page) <xsl:output method="text"/> <xsl:strip-space elements="*"/> <xsl:template match="DIVS"> <xsl:text><![CDATA[ <s:div ]]></xsl:text> <xsl:if test="@StyleClass"><xsl:text>StyleClass ="</xsl:text> <xsl:value-of select="@StyleClass" /><xsl:text><![CDATA[">]]></xsl:text> </xsl:if> <xsl:apply-templates select="PG"/> <xsl:text><![CDATA[ </s:div>]]></xsl:text></xsl:template> <xsl:template match="PG"> <xsl:text><![CDATA[<p>]]></xsl:text> <xsl:apply-templates select="BREAK"/> <xsl:apply-templates select="B"/> <xsl:text><![CDATA[</p>]]></xsl:text></xsl:template> <xsl:template match="BREAK"><xsl:text><![CDATA[<br /> ]]></xsl:text></xsl:template> <xsl:template match="B"> <xsl:text><![CDATA[ <b>]]></xsl:text> <xsl:value-of select="."/> <xsl:text><![CDATA[</b>]]></xsl:text></xsl:template> */
|

Cart



