Subject: RE: [xsl] IF-Test.....continued From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 14 Mar 2002 18:31:23 -0500 |
<xsl:template match="Book"> <xsl:copy> <!-- copies the Book element --> <xsl:copy-of select="@*"/> <!-- copies the attributes it has -->
<xsl:if test="not(@ISBN)"> <!-- adds an attribute when ISBN is missing --> <xsl:attribute name="NOCODE"> <xsl:text>B01</xsl:text> </xsl:attribute> </xsl:if> </xsl:copy> </xsl:template>
Well, match="book" won't match an element called <Book>
> Well,i've enclosed the template rule which involves IF > test. > > > <xsl:template match="book"> > <xsl:if test="not(@ISBN)"> > <xsl:attribute name="NOCODE"> > <xsl:text>B01</xsl:text> > </xsl:attribute> > </xsl:if> > </xsl:template> > > The Book element has the following format > <Book NAME="book-name" AUTHOR="author-name" > ISBN="91-6637-401-7"/> >
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] IF-Test.....continued, Michael Kay | Thread | [xsl] remaining part of( IF-Test.., laksh vr |
[xsl] Process an element depending., Alvaro Mujica | Date | [xsl] Displaying Descriptions Based, Katie McNally |
Month |