Subject: Re: [xsl] dynamically applying templates From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 15 Sep 2004 14:05:18 -0400 |
==== config ==== <citationstyle xmlns="http://xbiblio.sourceforge.net/xcs"> <content> <bibliography author-as-sort-order="yes"> <entry> <reftype name="book"> <title font-style="italic" after=", "/> <creator/> </reftype> </entry> </bibliography> </content> <citationstyle>
==== source ====
<doc> <!-- this would normally be docbook ng; but keep it simple for now --> <mods xmlns="http://www.loc.gov/mods/v3"> <name type="personal"> <namePart type="given">Jane</namePart> <namePart type="family">Doe</namePart> </name> <titleInfo> <title>Main Title</title> <subTitle>Subtitle</subTitle> </titleInfo> </mods> </doc>
==== xsl ====
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:db="http://docbook.org/docbook-ng" xmlns:mods="http://www.loc.gov/mods/v3" xmlns="http://www.w3.org/1999/xhtml" xmlns:bib="http://xbiblio.sourceforge.net/xbib" xmlns:cs="http://xbiblio.sourceforge.net/xcs" exclude-result-prefixes="mods db bib xs cs">
<xsl:output method='xhtml' encoding='utf-8' indent='yes'/>
<xsl:strip-space elements="*"/>
<!-- read the external citation style file --> <xsl:param name="citation-style" required="yes" as="xs:string" />
<xsl:variable name="styles" as="document-node()" select="doc(concat($citation-style, '.csl'))" />
<xsl:variable name="style-biblio" select="$styles/cs:citationstyle/cs:content/cs:bibliography"/>
<xsl:template match="/"> <xsl:param name="source"/>
<html> <div> <xsl:apply-templates mode="bibliography"> <xsl:with-param name="source" select="$style-biblio"/> </xsl:apply-templates>
<xsl:template match="/"> <html> <div> <xsl:apply-templates/> </div> </html> </xsl:template>
<bibliography author-as-sort-order="yes"> <entry reftype="book"> <title font-style="italic" after=", "/> <creator/> </entry> </bibliography>
I hope that helps, Wendell
====================================================================== 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 ======================================================================
--+------------------------------------------------------------------ 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@xxxxxxxxxxxxxxxxxxxxxx> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] dynamically applying temp, Bruce D'Arcus | Thread | Re: [xsl] dynamically applying temp, Bruce D'Arcus |
Re: [xsl] dynamically applying temp, Bruce D'Arcus | Date | Re: [xsl] dynamically applying temp, Bruce D'Arcus |
Month |