[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Multiplatform processing from the same source
Dan Gilleland wrote: > Hi Paul: > >> My understanding is that the 'href' attribute of 'xsl:import' can't >> take a parameter, so I can't pass in something system-specific from >> the Makefile (which would have been clumsy but sufficient). Is there >> an XSL solution to this problem? > > > If you can send in something "system-specific" from the Makefile to the > XSL, then all you need to do is use that parameter you were intending > for the <xsl:import> and use instead in an <xsl:choose>. For example: > > <xsl:choose> > <xsl:when test="$Machine = 'FreeBSD'> > <xsl:import ...... /> > </xsl:when> > <xsl:when test="$Machine = 'WinXP'> > <xsl:import ...... /> > </xsl:when> > <xsl:otherwise> > <xsl:import ...... /> > </xsl:otherwise> > </xsl:choose> > > This might do the trick in your top-level custom stylesheet. I don't think this will work, if I understand you correctly. According to the excellent book "XSLT Programmer's Reference" by Mickael Kay, <xsl:import> is a top-level element, and xsl:choose is not. In other words: xsl:import must be a direct child of the xsl:stylesheet element, while xsl:choose is an instruction and must appear within a template body. I still believe XML catalogs are the only "clean" way to solve the problem. Best regards, Rune Lausen
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]