LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject:

Re: null checking in XSL...

From:

Deepak Chandran <[log in to unmask]>

Reply-To:

General discussion of Extensible Markup Language <[log in to unmask]>

Date:

Tue, 24 Aug 1999 13:19:07 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (36 lines)


Rahul,

You can check this out.

----------------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
 <xsl:template match="text()">
  <xsl:value-of/>
 </xsl:template>
 <xsl:template match="/">
   <xsl:apply-templates select="A"/>
 </xsl:template>
 <xsl:template match="A">
  <xsl:apply-templates select="B"/>
 </xsl:template>

 <xsl:template match="B">
  <xsl:apply-templates />
 </xsl:template>

 <xsl:template match="B[@name]">
  <xsl:value-of select="@name"/>
 </xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------

But you may find that this works only for IE5.

<xsl:template match="B[@name]"> template selects all element containing the
attribute 'name'. <xsl:value-of select="@name"/> statement would then print
the value of the attribute 'name'.But this results in Xml fragment <B
name="">Deo</B> displaying nothing.

Regards,
Deepak


Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager