|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Use of variables
<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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








