[xsl] Different conditional outputs in same Stylesheet or calling another stylesheet (version 1.0, Xalan)

Subject: [xsl] Different conditional outputs in same Stylesheet or calling another stylesheet (version 1.0, Xalan)
From: "Pankaj Chaturvedi" <pankaj.chaturvedi@xxxxxxxxx>
Date: Wed, 27 Feb 2008 13:07:29 +0530
Hi all,

I am writing a stylesheets for different journal (basically for print),
wherein the order of authors, titles etc varies (<ref-book> here)depending
upon the <journalcode>.

See the reference part:
<article>
<meta>
<journalcode>CEDE</journalcode>
<issn type="print">XXXX-XXXX</issn>
</meta>
<references>
<ref-book id="CIT0001">
<authorfield>
<author-ref>
<surname>Bergstrom</surname><givenname>T.C.</givenname>
</author-ref></authorfield>
<chaptitle>xxxxx</chaptitle> <booktitle>yyyyyyy</booktitle>
<publicationfield>
<pubname>uuuu</pubname>
<pubplace><city>Amsterdam</city></pubplace>
<year>1997</year><volumenum>1A</volumenum></publicationfield>
<pagefield>
<firstpage/>
</pagefield>
</ref-book>
</references>
</article>

Reference part needs to be (just an example):
<ref-book id="CIT0001">
<authorfield>
<author-ref>
<givenname>T.C.</givenname><surname>Bergstrom</surname>
</author-ref></authorfield>, <year>1997</year>.
<chaptitle>xxxxx</chaptitle>, In:<booktitle>yyyyyyy</booktitle>
<publicationfield>
<pubname>uuuu</pubname>
<pubplace><city>Amsterdam</city></pubplace>
<volumenum>1A</volumenum></publicationfield>
<pagefield>
<firstpage/>
</pagefield>
</ref-book>
(See the punctuation and appearance of <year>).

Manipulating data, adding issue is not seems to be problem to me and I can
very much do that, while checking the <journalcode> string with the use of
XSLT, but I am little bit stuck with Idea how to do it in best way.

I have hundreds of journals for which I am developing stylesheet and they
are very much same till the reference part and the only which differentiate
them is reference style (which are 4 or 5 in count). Somebody, from
publishing industry will definitely understand this :-).

Anyways, Is there any way I can do it with in same style sheet with
conditionally checking the <journalcode>, instead of defining the . I am new
in XSLT but I am OK with XPath, so I believe I can do this.

Earlier I used to do it with one of the composition platform which supports
loading the namespaces but right now I would prefer to do t with Stylesheet.

Any suggestions in this regard will highly appreciated.

PS: I am using XSLT version "1.0" and currently going thru the Michael Kay's
Programmer's Reference book. May be some body can suggest where I need into
(I mean topics) to get this done.

I hope I've made myself clear!!!


I've been just going thru the book and I guess I need to look into the
<xsl:import> element. This means I need to write separate stylesheets and
later call them in main one.

Any suggestions.





Pankaj



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