Re: newbie questions

Subject: Re: newbie questions
From: "Kirk V. Hastings" <khasting@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Jan 2000 09:49:40 -0800

Here's my slight variation on the theme...

Also, if you're interested, I have some sample files up that were derived from files encoded using the TEI manuscript transcription DTD:


<?xml version='1.0'?>

<xsl:stylesheet version="1.0"

<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/">
      <title><xsl:value-of select="//manuscript/@name"/></title>

<xsl:template match="column">
    [Manuscript: <xsl:value-of select="ancestor::manuscript/@name"/>,
    folio: <xsl:value-of select="ancestor::folio/@number"/>,
    column: <xsl:value-of select="@colnumber"/>]<br/>

<xsl:template match="line">
  [<xsl:value-of select="@linenumber"/>]<xsl:apply-templates/><br/>


At 03:57 PM 1/26/00 +0100, you wrote:
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:

   <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 colnumber="35">
            <line linenumber="1">This is the first line of column 35</line>
            <line linenumber="2">The second line of column 35</line>
      <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>

        etc. etc. etc.

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.


XSL-List info and archive:

XSL-List info and archive:

Current Thread