|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Can ya plz
Hello everyone,
Well I have very small doubt.
I have xml file : code
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="temple.xsl"?>
<POETRIES>
<POETRY>
<TITLE>A Broken Heart</TITLE>
<ARTIST>by LeiLani Renee</ARTIST>
<P_BODY>
<PARA>You told me you loved me.</PARA>
<PARA>You said you would stay.</PARA>
<PARA>I thought we were meant to be.</PARA>
<PARA>But you went away.</PARA>
<PARA>I gave you my time and would never complain.</PARA>
<PARA>And what I got in return was sorrow and pain.</PARA>
<PARA>I stayed by your side through thick and thin.</PARA>
<PARA>No matter how hard you'd fall or how strong you'd win.</PARA>
<PARA>I thought our feelings were true and just.</PARA>
<PARA>For me it was love, for you it was lust.</PARA>
<PARA>Now that time has passed, I've begun to recover.</PARA>
<PARA>Because the love I had for you can't be found in another.</PARA>
<PARA>I realize now, maybe we were meant to be apart.</PARA>
<PARA>You didn't give me love, but instead a broken heart.</PARA>
</P_BODY>
</POETRY>
</POETRIES>
And XSL as follows:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
</xsl:stylesheet>
Its just blank one. But still I can't get any output in browser.I have changed it to some thing like this
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:for-each select="POETRY">
<xsl:call-template name="POETRY"/>
</xsl:for-each>
<xsl:template>
<xsl:template match="POETRY">
<xsl:value-of select="TITLE"/>
<xsl:value-of select="ARTIST"/>
<xsl:for-each select="P_BODY/PARA">
<p><xsl:value-of select="."/>
<xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Well If I am completely wrong in logic then please suggest me how to display this doucment through XSL.
Thanx in advance to you all wonderfull people.
Sign up for your "FREE E-MAIL" @ MADMAIL http://www.madmail.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








