[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: applying templates to all but ...
This is slightly more complicated as I work on it ...
On Sep 24, 2004, at 11:53 AM, David Carlisle wrote: 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? The logic is as follows: All records have a class and a type. Class has to be deduced algorithmically, while type is based strictly on the value of mods:genre. OK, so I have my variables that group types by class, like so: <xsl:variable name="refclass-partInSerial" select="('article-newspaper','legal case','bill','article')"/> .... and then, per David's (and Jeni's) suggestion, an apply-template like this: <xsl:apply-templates select="$style-biblio/(for $t in $refclass-partInSerial return cs:reftype[not(@inherit-from)][@name=$t])[1]/(cs:* except cs:creator)"> <xsl:with-param name="source" select="."/> </xsl:apply-templates> But, of course, this isn't quite right. What I need it to say is: - if the mods:genre=some value, and that value has an equivalent style definition, then use it - if not, then default to "article" (which is required) Most of the time, it would be using he default. So at it's most basic: if mods:genre='legal case' and cs:reftype/@name='legal case' exists, use it, etc. An additional complication is that the values of the mods:genre and cs:reftype/@name might not always quite line up. Bruce
|
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
|