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

Re: Format text within a XML tag...

Subject: Re: Format text within a XML tag...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 18 Jun 2002 12:08:05 +0100
xsl format text
> 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...

but if you are using XSLT then xsl:script is a syntax error not
a solution (not even of the quick and dirty kind).

Here's what I got:

<xsl:template match="/">
  <xsl:for-each select="./Output">
    <tr>
      <td>... some tags ...</td>
    </tr>
    <xsl:for-each select="./MapRule">


so far so good, although ./Output could more simply be wrriten as Output
as could ./MapRule


     <!-- Here I want to "mark" the comments -->
          <xsl:value-of select="./objectrule" />
        </td>

so replace that value-of by 
<xsl:call-template to a named template that does the
replacement. Someone just posted some code that looked about right so I
won't repeat here.


> When trying to add another template within the <td> tag 

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


You can't put xsl:templates inside anything. yhey are all at teh top
level, children of xsl:template.
A template specifies what code to execute if you ever apply templates to
a matching node. the order of the xsl:template instructions is imeterial
(except for error recovery) and as teh definitions of this matching
behaviour is essentially global it wouldn't make sense to nest them 9and
it's not allowed).

Note that changing from the-language-known-as-xsl-in-ie5 to XSL isn't
just a matter of changing the namespace it is essentially a completely
different language.

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


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.