Hi all,
I'm currently designing a website for a poet, and as I've been looking for an opportunity to try out xml I've decided to have a go at storing all the poem files in xml format.
The general structure goes like this:
<poem>
<verse>
<line>This would be the first line of the poem</line>
<line>This would be the second line of the poem</line>
...
</verse>
<verse>
...
</verse>
</poem>
I know this is a simple case, but my main reason for doing the site this way is as a learning exercise.
I have written an xslt file to display the poem, each verse is displayed as a separate <p> tag, and a <br/> tag is inserted at the end of each line.
So far so good!
My problems begin when I try to expand on what I already have! Ideally I would like to include both <strong> and <em> tags into the poem files for a little extra control over the formatting, but I don't know how to make the xslt change the <strong> tags in my xml file into normal html <strong> tags whilst keeping the rest of the <line> element intact.
I've searched through all my books and forums and can't find anything that addresses this particular problem. If anybody could point me in the right direction I would be grateful.
Many thanks.
I'm currently designing a website for a poet, and as I've been looking for an opportunity to try out xml I've decided to have a go at storing all the poem files in xml format.
The general structure goes like this:
<poem>
<verse>
<line>This would be the first line of the poem</line>
<line>This would be the second line of the poem</line>
...
</verse>
<verse>
...
</verse>
</poem>
I know this is a simple case, but my main reason for doing the site this way is as a learning exercise.
I have written an xslt file to display the poem, each verse is displayed as a separate <p> tag, and a <br/> tag is inserted at the end of each line.
So far so good!
My problems begin when I try to expand on what I already have! Ideally I would like to include both <strong> and <em> tags into the poem files for a little extra control over the formatting, but I don't know how to make the xslt change the <strong> tags in my xml file into normal html <strong> tags whilst keeping the rest of the <line> element intact.
I've searched through all my books and forums and can't find anything that addresses this particular problem. If anybody could point me in the right direction I would be grateful.
Many thanks.