[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: converting certain types of lists into HTML

Subject: RE: converting certain types of lists into HTML
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 17 Sep 2001 14:48:57 +0100
types of list
Use two different template rules, one for match="item" and the other for
match="flatlist/item", since you want the processing to be different in the
two cases. I usually give the different rules an explicit priority to make
it clear which takes precedence, though in this case the default rules would
give the right answer.

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Andreas
> Putscher
> Sent: 17 September 2001 11:51
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.