[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: using identity transform to change <p /> into <p>t
Subject: Re: using identity transform to change <p /> into <p>text</p>
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Wed, 08 May 2002 09:04:19 -0700
|
could you do something like:
<xsl:template match="p">
<p>
<xsl:choose>
<xsl:when test=".=''">
<xsl:text>the text</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</p>
best,
-Rob
Zack Brown wrote:
On Wed, May 08, 2002 at 03:33:52PM +0100, David Carlisle wrote:
I have a bunch of files with the following form:
I think the simplest and most humane approach is to shoot the author of
the documents.
but I'm such a nice guy!! Plus I've learned the error of my ways. Oh,
hell, you're right... *BLAM*
However failing that....
This is another case where XSLT2 positional grouping would come in
handy, but to do it in XSLT1, the basic idea is
...
untested:-)
Weird. I just tested it and it definitely approaches the right thing,
although it also approaches several other things that I have yet to
understand. Definitely something I can work with, though.
Thanks,
Zack
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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|