Subject: Re: [xsl] Need help for XSL beautifaction From: Christian Haase <haase@xxxxxxxxxxx> Date: Wed, 17 May 2006 19:27:39 +0200 |
<?xml version="1.0" encoding="ISO-8859-1"?> <Document> <textNo>text-1</textNo> </Document>
Hoped there was a way like this: <xsl:copy-of select="${<xsl:copy-of select='textNo'/>}"/>
Greetings, Christian
Hi Christian,
I think that what you want is to dynamically evaluate the expression that is in the textNo element, right?
In that case there are two possibilities, one is to do this in two transformations, one to generate a stylesheet and then apply that stylesheet on the actual data. The other possibility is to use a processor extension function like saxon:evaluate for instance. Of course if the number of expressions is limited you can handle that with an if (or if you have more expressions eventually with a choose) as you do right now.
Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
Christian Haase wrote:
Hi all!
Do you have any ideas how I can code this XSL more beautiful:
<xsl:if test="textNo = 'text-1'" > <xsl:copy-of select="$text-1"/> </xsl:if>
In other words: Is there a chance to use the <copy-of> directly with the value of "textNo", without the <xsl:if> ?
Greetings, Christian
------------------------------------- Christian Haase, Hans-Mertens-Str. 37 30655 Hannover, GERMANY Tel: +49-511-697916 / +49-178-7772617 Fax: +49-511-3948280 ICQ: 307628315 -------------------------------------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Need help for XSL beautif, George Cristian Bina | Thread | Re: [xsl] Need help for XSL beautif, Jon Gorman |
RE: [xsl] unknown protocol classpat, Michael Kay | Date | RE: [xsl] Need help for XSL beautif, Michael Kay |
Month |