Altova Mailing List Archives

Re: [xsl] applying templates to all but ...

From: Bruce D'Arcus <bdarcus@------------->
Date: 9/24/2004 3:43:00 PM
On Sep 24, 2004, at 9:59 AM, David Carlisle wrote:

Except the [1] you put near the end is saying to use the first in the
list; right?

yes or no (depending on what you mean) It doesn't take the first in

_that_ list there would be no point in doing 

as that's just a long way of writing 'article-newspaper' it takes teh

first element in the sequence of cs:reftype nodes obtained by selecting

the cs:reftypes  with name attribute equal to an item in the list.

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?

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:

select="$style-biblio/(for $t in ('article-newspaper','article')
                return cs:reftype[@name=$t])[1]/cs:*">

... in practice you'd want to put the list into a variable or pull it
from a config file or something.

..... and what would, say, the variable actually look like?



These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.