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

RE: Suppress and test

Subject: RE: Suppress and test
From: "Pankaj Chaturvedi" <pankaj.chaturvedi@xxxxxxxxx>
Date: Mon, 7 Apr 2008 15:35:21 +0530
RE:  Suppress and test
Hi Michael,

The element simply looks like

<journalcode>CIJB</journalcode>

wherein string "CIJB" can be anything (CIJB, CEDE or XXX etc). All I am
trying to apply different modes depending upon <journalcode> string value
and secondly trying suppress the string <journalcode dummy="whatever"/>.

Ronan suggestion does the trick but may there is another way doing that.

Hope it makes clear.

Pankaj



-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Monday, April 07, 2008 2:16 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Suppress and test



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.chaturvedi@xxxxxxxxx]
> Sent: 07 April 2008 09:27
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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."

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.