Different conditional outputs in same Stylesheet
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!!!
Pankaj
__________________
Pankaj
|