Subject: Re: newbie questions From: "Kirk V. Hastings" <khasting@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 26 Jan 2000 09:49:40 -0800 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <html> <head> <title><xsl:value-of select="//manuscript/@name"/></title> </head> <body> <xsl:apply-templates/> </body> </html> </xsl:template>
<xsl:template match="column"> <p> [Manuscript: <xsl:value-of select="ancestor::manuscript/@name"/>, folio: <xsl:value-of select="ancestor::folio/@number"/>, column: <xsl:value-of select="@colnumber"/>]<br/> <xsl:apply-templates/> </p> </xsl:template>
<xsl:template match="line"> [<xsl:value-of select="@linenumber"/>]<xsl:apply-templates/><br/> </xsl:template>
Hello everyone,
I've only recently started to learn XML/XSL and, as there is so little information available on XSL on the web, I'm running into some problems. I'm setting up a system that displays texts from medieval manuscripts. The XML-structure is as follows:
++++++++++++++++++++++++++++++ <medieval> <manuscript name="bla"> <folio number="1"> <column colnumber="34"> <line linenumber="1">This is the first line</line> <line linenumber="2">This is the second line</line> </column> <column colnumber="35"> <line linenumber="1">This is the first line of column 35</line> <line linenumber="2">The second line of column 35</line> </column> </folio> <folio number="2"> <column colnumber="36"> <line linenumber="1">First line, page 2, column 36</line> <line linenumber="2">Second line, page 2, column 37</line> </column>
etc. etc. etc. </folio> </manuscript> </medieval> ++++++++++++++++++++++++++++++
A little confusing perhaps, as each page/folio usually has two columns.
The outcome in HTML should be something like this:
++++++++++++++++++++++++++++++ [Manuscript: bla, folio: 1, column: 34] [1] This is the first line [2] This is the second line
[Manuscript: bla, folio 1, column: 35] [1] This ist he first line of column 35 [2] The second line of column 35
[Manuscript: bla, folio 2, column 36] [1] First line, page 2, column 36 [2] Second line, page 2, column 37
etc. etc. etc. ++++++++++++++++++++++++++++++
I have no idea how to do this in XSL. Could someone help me out, please, and show me what the XSL should be to produce the required outcome? Once I get some examples that work, I usually learn pretty fast and I can experiment with it but I haven't seen any examples yet that look remotely like mine. Many thanks in advance.
Mick mick@xxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: newbie questions, Sebastian Rahtz | Thread | Re: Stripping ampersands (was RE: c, Mike Brown |
Re: can XML-XSL do what Lisp and , David Carlisle | Date | Re: Stripping ampersands (was RE: c, Mike Brown |
Month |