Subject: Re: [xsl] using mode-values within a template From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 2 May 2002 13:50:42 +0100 |
<xsl:template match="foo" mode="bar"> <xsl:variable name="mode" select="'bar'"/> It's not the most elegant way but it works! But what is "work" here? As others have said this information can not be that useful, everywhere where it is legal to use the syntax $mode you could just as easily use the string 'bar' as either $mode is set to 'bar' or it is out of scope. > but I haven't read anything about a general element siblings (only > preceding- and following-siblings) in xpath!! siblings are ../* (children of your parent) But you want all your sibling projects that are not you, so that is select="preceding-sibling::project|following-sibling::project" or select="../project[not(generate-id(.)=generate-id(current()))] or if your name attribute is enough to distinguish: select="../project[not(@name=current()/@name] (don't use // as in //project unless you really want to search the entire document, // is almost always the cause of slow stylesheets) > %0A that is hex 10 in URI quoted syntax, ie it's a newline character coming from your white space before www: you can get rid of that by using <xsl:variable name="online_doc" select="normalize-space(docu[@kind='url'])"/> David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] using mode-values within , ChivaBaba | Thread | Re: [xsl] using mode-values within , Oleg Tkachenko |
Re: WG: [xsl] RPN calculator, Jeni Tennison | Date | Re: [xsl] RPN calculator, Siarhei Biarozkin |
Month |