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

Re: dynamically applying templates

Subject: Re: dynamically applying templates
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Tue, 14 Sep 2004 21:04:25 -0400
applying html templates
On Sep 14, 2004, at 4:27 PM, Wendell Piez wrote:

I'm going to leave the deeper look-see for later (being rather snowed myself), if you don't mind, and hope that the correction above will confirm that you're on the right track....

I don't mind.


I'm getting closer. I now get:

<html xmlns="http://www.w3.org/1999/xhtml">
   <div>JaneDoeMain TitleSubtitle</div>
</html>

Which suggests some of the templates are matching. But clearly not all of them are, and the crucial order business is wrong (title should come before name here). I'm guessing the problem is in one or both of the first two templates.

<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>
    </div>
  </html>
</xsl:template>

<xsl:template match="cs:entry/cs:reftype[@name='book']" mode="bibliography">
<xsl:param name="source"/>
<test>
<xsl:apply-templates>
<xsl:with-param name="source" select="$source"/>
</xsl:apply-templates>
</test>
</xsl:template>


<xsl:template match="cs:title">
  <xsl:param name="source"/>
  <xsl:apply-templates select="$source/mods:titleInfo" mode="full"/>
</xsl:template>

<xsl:template match="mods:titleInfo" mode="full">
  <span class="title">
    <xsl:apply-templates select="mods:title"/>
    <xsl:apply-templates select="mods:subTitle"/>
  </span>
</xsl:template>

<xsl:template match="cs:creator" mode="full">
  <xsl:param name="source"/>
  <xsl:apply-templates select="$source/mods:name" mode="full"/>
</xsl:template>

<xsl:template match="mods:name" mode="full">
  <span class="creator">
    <xsl:apply-templates select="mods:namePart"/>
  </span>
</xsl:template>

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.