Subject: Re: Use of variables From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 4 Jul 2000 19:01:34 +0100 (BST) |
<xsl:variable name="ridval" select="substring-after('aff',$ridsval)" You probably want the arguments to substring-after in the other order. <xsl:attribute name="{$ridval}">RID VAL</xsl:attribute> xsl:attribute can only add attribute nodes if no child nodes of the current element have been added. Ie typically it has to come immediately after the opening of an xsl:element, an xsl:copy or a literal result element. You have it at the top level of the author template, which might possibly work for one author, but not its siblings. If you uncomment the xsl:element it can't work as then the xsl:element will have added a child node. > <xsl:variable name="ridsval" select="@rids[(letter+ digit+)]" /> No regexp in xslt. You could use an extension function to use java regexp library, in which case it would look something like <xsl:variable name="ridsval" select="@rids[myfun:foo(.)]" where myfun is the java extension namespace for your system and foo() is a java function that accepts a node set and returns true if its string value matches the regexp that you want to test. (Someone else will have to provide the function:-) David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Use of variables, Benjamin Ryan | Thread | Attributes and DOM, Jean-Claude Tarby |
Re: Returning from a call-template , David Carlisle | Date | Re: Well-formed, Mike Brown |
Month |