Re: [xsl] Format text within a XML tag...

Subject: Re: [xsl] Format text within a XML tag...
From: "Anders Wasen" <a_wasen@xxxxxxxxxxx>
Date: Tue, 18 Jun 2002 12:12:09 +0200
Hi David, thanks for the response!

Yes, I want to use the standard XSLT language, I added the script as a "quick and dirty" solution to be able to demo it for some customers...

I have not done any "advanced" XSL:s before, only basic things, I tried to get the "recursive template" to work, but did not manage...

Here's what I got:

<xsl:template match="/">
 <xsl:for-each select="./Output">
   <tr>
     <td>... some tags ...</td>
   </tr>
   <xsl:for-each select="./MapRule">
     <tr>
       <td>
         <!-- Here I want to "mark" the comments -->
         <xsl:value-of select="./objectrule" />
       </td>
     </tr>
   </xsl:for-each>
 </xsl:for-each>
</xsl:template>

It's the <objectrule> that contains the /* and */ that I would like to "mark". When trying to add another template within the <td> tag I get the following message:

"Keyword xsl:template may not be used here."

Am I missing something...???

Thanks,
Anders

From: David Carlisle <davidc@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Format text within a XML tag...
Date: Tue, 18 Jun 2002 10:41:06 +0100

> <xsl:eval

there is no xsl:eval element in XSL.
If you want solutions in XSL (that is, XSLT) then this is the right list
to ask, if however that was not just a typo and you are looking for
solutions in the proprietary (and deprecated) transformation language
built into MSXML2 then this isn't the right list.

Assuming you are using the standard XSLT language then you basically
just want to use a recursive template using the substring-before and and
substring after functions to split up teh input string.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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






________________________________________________________ Anders Wasén a_wasen@xxxxxxxxxxx


_________________________________________________________________
Kom med i världens största e-posttjänst med MSN Hotmail. http://www.hotmail.com



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



Current Thread