Hi David, Michael,
Yes, the stylesheet did apply that template to my XML file.
Then I removed the first line again and modified the following line as follows:
<xsl:template match="indexterm">
<indexterm>
<xsl:value-of select="translate(.,' ','&')"/>
</indexterm>
</xsl:template>
And again, the template removed the spaces in my indexterm elements,
instead of replacing them with the specified character.
I'm thinking "XSL gremlins." :-)
Regards,
Mark
On 5/14/07, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
I think select=".)" was a typo for select="."
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Mark Peters [mailto:flickrmeister(_at_)gmail(_dot_)com]
> Sent: 14 May 2007 12:31
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> Subject: Re: [xsl] RE: Replacing the space character with
> another character
>
> Do you mean I should literally include the following template?
>
> <xsl:template match="indexterm">
> <indexterm>
> old[<xsl:value-of select=".)"/>]
> new[<xsl:value-of select="translate(.,' ','&')"/>]
> </indexterm>
> </xsl:template>
>
>
> I added it, and Xalan produced an error:
>
> SystemId Unknown; Line #20; Column #37; XSLT Error
> (javax.xml.transform.Transfor
> merConfigurationException):
> javax.xml.transform.TransformerException: javax.xml.
> transform.TransformerException: Extra illegal tokens: ')'
>
> Thanks,
> Mark
>
>
> On 5/14/07, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:
> >
> > > > > <xsl:template match="indexterm">
> > > > > <indexterm>
> > > > > <xsl:value-of select="translate(.,' ','&')"/>
> > > > > </indexterm>
> > > > > </xsl:template>
> > > > >
> >
> > are you sure that that template is ever being executed?, add
> > <xsl:message>I am here</xsl:message> or change it to
> >
> > <xsl:template match="indexterm">
> > <indexterm>
> > old[<xsl:value-of select=".)"/>]
> > new[<xsl:value-of select="translate(.,' ','&')"/>]
> > </indexterm>
> >
> >
> > it may be that a higher priority template is being
> executed, or it's a
> > namespace issuee, or....
> >
> > David
>
> --~------------------------------------------------------------------
> 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(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Mark Peters
Senior Technical Writer
Saba Software
--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--