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

Re: No match or what...

Subject: Re: No match or what...
From: "Dave Pawson" <dave.pawson@xxxxxxxxxx>
Date: Sun, 7 May 2000 19:57:48 +0100
foreach no match
David C explained what was happening, 
so to try it out I generated the following
to 'demonstrate' it.

xml:

<?xml version="1.0" ?>
<RDF>
 <channel>first block of text
  <title>(Contained block of text)</title>Second block of text</channel>
 </RDF>
    
xsl:
<?xml version="1.0" ?> 

 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

>
     
     <xsl:output method="xml" indent="yes"/>
     
     
     <xsl:template match="/RDF">
    		 <xsl:apply-templates  />
         </xsl:template>
 
     <xsl:template match="channel">
===================================
Output from normalize-space(text()[1])
<xsl:value-of select="normalize-space(text()[1])"/>

Output from normalize-space(text()[2])
<xsl:value-of select="normalize-space(text()[2])"/>

====================================
Now output from value-of select= .
       <xsl:value-of select="."/>
===================================
Output from normalize-space(text())
<xsl:value-of select="normalize-space(text())"/>
===================================
Output from for-each select=text()
 <xsl:for-each select="text()">
  <xsl:value-of select="."/>
 </xsl:for-each>
</xsl:template>
 
</xsl:stylesheet>
      

Result:

<?xml version="1.0" encoding="utf-8"?>

 
===================================
Output from normalize-space(text()[1])
first block of text

Output from normalize-space(text()[2])
Second block of text

====================================
Now output from value-of select= .
       first block of text
  (Contained block of text)Second block of text
===================================
Output from normalize-space(text())
first block of text
===================================
Output from for-each select=text()
first block of text
  Second block of text
 


 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.