[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: configuring a conditional
> To the first occurrence of the citation in the text. Ah I didn't even guess that, I thought you were styling the bibligraphy not the reference. > Feel free to suggest better names. well having an attribute name like and-something="foo" rather implies that this is a following clause constraining some condition set by an earlier attribute, but attributes are explictly unordered. I'd use <rule min-authors="3" max-authors="5" stuff that happens if there are between 3 to 5 authors inclusive... instead of <rule when-more-than="2" and-less-than="6" Of course attribute names are purely cosmetic, you could have <rule u68gug7g="2" k0ujufyrts="6" but sometimes cosmetics matter (so I'm told:-) Remember, this part is just the styling language, where I use this sort of convention throughtout; e.g.: Yes but I'd rather specify the style used for et al separately (and in only one place) not every time et al gets used in a rule that says what to do if you are the 3rd occurrence of a reference to a 500 author paper on high energy pysics. In the XSLT, it could certainly be separate steps. That's an implementation detail, It's what the humans have to write that is more important. Aside: I've still not worked out HOW to deal with this first/subsequent business generally. It's easy enough (although possibly expensive) to know if you are the first citation to a particular reference, eg you could use xsl:number and see if you get the number 1, or perhaps better havs an xsl:key that matches all references, keyed on the reference id then you just have to ask if the current node is the first node in document order in the sequence returned by the key for this reference. so for example if the syntax is <xref linkend="foo"/> and you want to know if this is the first such reference <xsl:key name="xr" match="xref use="@linkend"/> .. <xsl:template match="xref"> <xsl:if test=". is key('xr',@linkend)[1]"> I'm first ... 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
|