[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: using mode-values within a template
<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
|
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
|