gzc5211 / Hilaire-Belloc-1-Cautionary-Tales-for-Children

https://gzc5211.github.io/Hilaire-Belloc-1-Cautionary-Tales-for-Children/
4 stars 0 forks source link

XSLT on Poems: Questions/ Correction #7

Open ebeshero opened 1 year ago

ebeshero commented 1 year ago

I noticed two strange things on navigating the poems page. @gzc5211 @MinWu859 @kzp308 @DivinexRoyalty

  1. The poems have a descriptive text at the top that you've output one way, with styling to show they are not part of the poem. But they are being output twice, so you need to figure out why and correct the XSLT.

Actually the title of the poem AND the descriptive text are both being output twice.

image

  1. Why are the poems sorted alphabetically? I am sorry we did not catch this before, but the INTRODUCTION poem comes out in the middle, and the reading order is odd this way. You might want to keep an alphabetically sorted table somewhere on the site as an alternative way to navigate the poems, since it helps to find a poem quickly by its title. But they should really be output in their reading order.

How to do this? The collection of files won't come out in the reading order without some kind of sort. I think you want something in the files to indicate their reading order, maybe an attribute on the root element: @sort="1" for the first poem, @sort="2" for the second to put them in their reading order! Then use the @sort attribute as the basis for your <xsl:sort> using <xsl:sort select="@sort">

gzc5211 commented 1 year ago

Hi, Dr.B @ebeshero .I try to add a and put in. But not working. No one can help me fix this. But I already push my code up to github.