Subject: [xsl] Normalizing Whitespace When Not Using "xsl:value-of" From: Nathan Tallman <ntallman@xxxxxxxxx> Date: Thu, 21 Feb 2013 13:03:00 -0500 |
Is it possible to remove whitespace when inserting values without using xsl:value-of? This is my template. It outputs HTML meta tags, but I can't figure out how to normalize the space when not using xsl:value-of. I'm using xslt 1.0. Many thanks, Nathan <xsl:template name="metadata"> <meta http-equiv="Content-Type" name="dc.title" content="{eadheader/filedesc/titlestmt/titleproper}"/> <meta http-equiv="Content-Type" name="Description" content="{/ead/archdesc[1]/did[1]/abstract[1]}"/> <meta http-equiv="Content-Type" name="dc.description" content="{/ead/archdesc[1]/did[1]/abstract[1]}"/> <meta http-equiv="Content-Type" name="dc.author" content="{archdesc/did/origination}"/> <meta http-equiv="Content-Type" name="lastMod" content="current-dateTime()"/> <xsl:for-each select="//controlaccess/persname | //controlaccess/corpname"> <xsl:choose> <xsl:when test="@encodinganalog='600'"> <meta http-equiv="Content-Type" name="dc.subject" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:when> <xsl:when test="//@encodinganalog='610'"> <meta http-equiv="Content-Type" name="dc.subject" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:when> <xsl:when test="//@encodinganalog='611'"> <meta http-equiv="Content-Type" name="dc.subject" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:when> <xsl:when test="//@encodinganalog='700'"> <meta http-equiv="Content-Type" name="dc.contributor" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:when> <xsl:when test="//@encodinganalog='710'"> <meta http-equiv="Content-Type" name="dc.contributor" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:when> <xsl:otherwise> <meta http-equiv="Content-Type" name="dc.contributor" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:for-each select="//controlaccess/subject"> <meta http-equiv="Content-Type" name="dc.subject" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:for-each> <xsl:for-each select="//controlaccess/geogname"> <meta http-equiv="Content-Type" name="dc.subject" content="{.}"/> <meta http-equiv="Content-Type" name="subject" content="{.}"/> </xsl:for-each> <meta http-equiv="Content-Type" name="dc.title" content="{archdesc/did/unittitle}"/> <meta http-equiv="Content-Type" name="dc.type" content="text"/> <meta http-equiv="Content-Type" name="dc.format" content="manuscripts"/> <meta http-equiv="Content-Type" name="dc.format" content="finding aids"/> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting info of runtime f, Wendell Piez | Thread | Re: [xsl] Normalizing Whitespace Wh, Martin Honnen |
Re: [xsl] Getting info of runtime f, Wendell Piez | Date | Re: [xsl] Normalizing Whitespace Wh, Martin Honnen |
Month |