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

Re: need help with converting attribute into elements

Subject: Re: need help with converting attribute into elements
From: Aleš Peregrin <ales.peregrin@xxxxxxxxxx>
Date: Tue, 14 Oct 2003 11:48:45 +0200
peregrin email
Hi Rod,

thanx for your solution suggestion.
I'm not sure, wheter I understand it right. Does it mean to write it eight
times, once for each combinatoion of the atribute values, e.g. first for
"all true", than <otherwise> one of them false and so on? Or is there some
easier way? Could you please
write some more detailed example?

thanx

Ales Peregrin

----- Original Message -----
From: "Rod Humphris - FLPTN" <rod.humphris@xxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, October 14, 2003 11:05 AM
X-Scanned: By Symantec Anti-Virus Scan Engine
Subject: Re:  need help with converting attribute into elements


> Hi Ales
>
> I expect someone could suggest a prettier and more modular approach but
> nested choose blocks would do it:
>
> <xsl:template match="text">
>  <p>
>   <xsl:choose>
>    <xsl:when test="@bold='true'">
>     <b>
>      <xsl:choose>
>       <xsl:when test="@italic='true'">
>        <i>
>          etc, etc.....
>     </b>
>    </xsl:when>
>    <xsl:otherwise>
>
>    </xsl:otherwise>
>   </xsl:choose>
>  </p>
> </xsl:template>
>
> Cheers
>
> Rod
>
>
> -----Original Message-----
> From: Aleš Peregrin [mailto:ales.peregrin@xxxxxxxxxx]
> Sent: 14 October 2003 09:47
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> X-Scanned: By Symantec Anti-Virus Scan Engine
> Subject: RE:  need help with converting attribute into elements
>
>
> Hi!
> I'm trying to make a XSLT stylexheet for transforming XML document into
HTML
> and there is a problem I'm unable to solve, even after a week of trying
and
> searching all over the internet. The problem looks quite easy to me and it
> seems I'm missing something important about XSL  language. Here it goes:
>
> I have an XML tag which looks like this: <text bold=true italic=true
> underline=false>Help!</text>
> In this case, the result in HTML should be:
> <font>
>    <b>
>       <i>
>          Help!
>       </i>
>    </b>
> </font>
>
> I simply need to transform the attributes into HTML elements so that any
of
> the possible combinations of the atributes' values would be transformed
> correctly.
>
> Can anyone help me?
> Thanx.
> Ales Peregrin
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
>
>
> ________________________________________________________________
> Any opinions expressed in this email are those of the individual and not
necessarily the Company. Unless expressly stated to the contrary, this email
is not intended to give rise to a new, or affect an existing, contractual or
other legal relationship.This email and any files transmitted with it,
including replies and forwarded copies which may contain alterations)
subsequently transmitted from the Company, are confidential and solely for
the use of the intended recipient. The unauthorised use, disclosure or
copying of this email, or any other information contained or attached,is
prohibited and could, in certain circumstances, be a criminal offence.
>
> If you have received this email in error please notify the sender as soon
as possible.
>
> This footnote also confirms that this email message has been swept for the
presence of computer viruses.
>
> www.focusdiy.co.uk
> _________________________________________________________________
>
> ________________________________________________________________________
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> ________________________________________________________________________
>
>  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.