Please show what your input looks like and what your desired output looks
like. It's impossible to work out what you want to achieve simply by
studying code that does something different.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Pankaj Chaturvedi [mailto:pankaj(_dot_)chaturvedi(_at_)idsil(_dot_)com]
Sent: 07 April 2008 09:27
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Suppress and test
Hi,
I've an element <journalcode>CIJB</journalcode>, which I want
to suppress (make an empty element) in my output while also
testing its string value to apply different modes.
I've defined the following but ending up with result
<journalcode dummy="CIJB"/>CIJB<issn ............... (though
getting fair result with testing). I've tried different way
around to get the desired output (<journalcode
dummy="CIJB"/>) but doesn't seems to be working. Can I've any
suggestions in this regard. I think I am doing something
wrong with <xsl:apply-templates> here, but not sure.
<xsl:template match="article/meta/journalcode"> <xsl:element
name="journalcode">
<xsl:attribute name="dummy">
<xsl:value-of select="string(.)"/>
</xsl:attribute>
<xsl:copy-of select="@*"/>
</xsl:element>
<xsl:if test="string(.)='CEDE'">
<xsl:apply-templates mode="CEDE"/>
</xsl:if>
<xsl:if test="string(.)='CIJB'">
<xsl:apply-templates mode="F-chic-auth-date"/>
</xsl:if>
</xsl:template>
Best,
Pankaj Chaturvedi
==============================================================
==============
================
Confidentiality Notice:" This message and any attachment(s)
contained here are information that is confidential,
proprietary to IDS Infotech Ltd. and its customers.
Contents may be privileged or otherwise protected by law. The
information is solely intended for the individual or the
entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read,
forward, print, retain, copy or disseminate this message or
any part of it. If you have received this e-mail in error,
please notify the sender immediately by return e-mail and
delete it from your computer."
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--