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

Subject: Re: [xsl] applying templates to all but ...
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2004 09:20:43 -0400
On Sep 24, 2004, at 9:03 AM, David Carlisle wrote:

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

So, the ('article-newspaper','article') bit would just be a long list of possible values?


Except the [1] you put near the end is saying to use the first in the list; right? Does that not work if you have more than 2? I'll probably ultimately have a list of ten or so optional types in each class.

I should add here I originally planned to not control the value of optional types in the config schema. I've sort of concluded that's not practical between the schema and the xslt code.

and I suspect the outer choose could be simplified as well although I
haven't follwed all your logic.

If you mean the class business, all the logic says is if you have a relatedItem[@type='host'] (think DC isPartOf), you have a part of something else (and thus, it will have more than two titles, set of names, etc.).


Within "parts", you have the two classes: things issued once (like edited books), and issued continually (like periodicals).

In the schema, the classes are called part-inMonograph and part-inSerial respectively, but I really want to shield users from that awkwardness, so it is not apparent in the instances in any obvious way.

All else just has one set of titles, names, etc..

Bruce

Current Thread