[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: applying templates to all but ...
> So if I have five in the list, and I want all of the first four that > are present in the config file to be applied first, and the last > (article) only, well, last (because it is the fallback)? I use the > same syntax? "all" or "any" ? If you have [1] then only one will be used, the first one for which their is a hit (using the fact that xslt2 sequences are ordered, the order of strings in the sequence controls which you try first) If you mean that you want _all_ of the first four to be applied if elements with all those attributes are there then you'd need a different syntax. > Actually, the optional types only get applied from this template if > they do not contain an "inherit-from" attribute. Does that change how > you'd code it? Here's what you had: > > <xsl:apply-templates > select="$style-biblio/(for $t in ('article-newspaper','article') > return cs:reftype[@name=$t])[1]/cs:*"> I don't carry a picture of your input in mmy head so I have trouble mapping the english "optional types" to any part of that expression but perhaps <xsl:apply-templates select="$style-biblio/(for $t in ('article-newspaper','article') return cs:reftype[not(@nherit-from)][@name=$t] )[1]/cs:*"> > ..... and what would, say, the variable actually look like? A long time since I did any electronics but some kind of electron state change in some silicon somewhere. I just meant replace ('article-newspaper','article') by $foo and have <xsl:variable name="foo" select="('article-newspaper','article')"/> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|