This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using identity transform to change <p /> into <p>text</p>


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]