[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: DSSSL/XSL: act on an attribute and then do the usual thing?
suppose I want <quote role="foo">bar</quote> to be translated by the DSSSL and XSL into <strong class="foo">"bar"</strong> I do not want to copy the whole of the "quote" transforms into my *.dsl and *.xsl customization layers. I do not want to replace all my <quote role="foo">bar</quote> with <emphasis role="foo"><quote>bar</quote></emphasis> because I might want to use <tt> instead of <strong> and I do not want to have to replace it again with <literal role="foo"><quote>bar</quote></literal> [actually, I would not have to do that, I will just need to change the way <emphasis role="foo"> is handled, but forget that for a sec]. The bottom line is : how do I write: (element quote (let ((role (attribute-string (normalize "role")))) (make element gi: "STRONG" attributes: (list (list "CLASS" role)) now-transform-the-original-quote-the-standard-way-as-if-there-was-no-role))) and <xsl:template match="quote[@role = 'package']"> <strong class="{@role}"><xsl:now-transform-the-original-quote-the-standard-way-as-if-there-was-no-role/></strong> </xsl:template> I thought that <xsl:template match="quote[@role = 'package']"> <strong class="{@role}"> <xsl:call-template name="quote"/> <xsl:apply-templates/> </strong> </xsl:template> would work, but I get runtime error: file common.xsl line 24 element call-template xsl:call-template : template quote not found any suggestions? thanks! -- Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> If Perl is the solution, you're solving the wrong problem. - Erik Naggum
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]