This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

converting certain types of lists into HTML


Hi XSL-List!

I am a novice in XML and I am searching a solution for the following
problem:

I have a xml-document which I want o translate into a HTMl-document:

The xml document's DTD contains several types of lists which I would like to
translate into HTML's <dt> and <dl>, <ul> and <ol> tags:

<flatlist>
   <item>Item 1.1</item>
   <item>Item 1.2</item>
   <item>Item 1.3</item>
  </flatlist>

  <bulletlist>
   <item>Item 1.1</item>
   <item>Item 1.2</item>
   <item>Item 1.3</item>
  </bulletlist>

  <numberedlist>
   <item>Item 1.1</item>
   <item>Item 1.2</item>
   <item>Item 1.3</item>
  </numberedlist>

I have been trying this by this code, which does not work properly for the
flatlist, as they get bullets, as well:

  <!--===========================FLATLIST======================-->
  <xsl:template match="flatlist">
    <dl><xsl:apply-templates/></dl>
  </xsl:template>

  <!--===========================BULLETLIST======================-->
  <xsl:template match="bulletlist">
    <ul><xsl:apply-templates/></ul>
  </xsl:template>

  <!--===========================NUMBEREDLIST======================-->
  <xsl:template match="numberedlist">
    <ol><xsl:apply-templates/></ol>
  </xsl:template>


   <!--===========================ITEM=========================-->
  <xsl:template match="item">
        <li><xsl:apply-templates/></li>
  </xsl:template>


Does anybody know a solution for my problem?
Thanks in advance,
Andreas


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]