[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Importing stylesheet
> I'm looking for a bit of confirmation. I've gone through Mike > Kay's book but > I want to clear up the last bit of confusion. > > I have a library stylesheet that contains among other things a default > wrapper for the HTML I create. The library is (approx): > <xsl:stylesheet> > <xsl:template name="DefaultWrapper"> > <xsl:with-param name="innerHTML" /> > <html><head><xsl:call-template name="getJSCode" > /></head><body><xsl:copy-of select="innerHTML" /></body></html A couple of typos here: xsl:with-param should be xsl:param and select="innerHTML" should be select="$innerHTML". > > Now it seems to me that I should get alerts with "New this" > and "New that" > respectively but I'm wondering if the templates in an > included stylesheet > have access to all the included stylesheets or only the ones > it includes in itself. Yes, the call-template in the imported stylesheet should select the template with highest import precedence, which is the one in the importing stylesheet. > > In a related question, what happens when the same stylesheet > is included in > multiple places in an include chain. It's exactly the same as if you included/imported two stylesheet modules with the same content but different names: you get two copies of the same thing. Which may be an error, especially with xsl:include, if it leads to duplication of entries where duplicates aren't allowed, e.g. several global variables with the same name at the same import precedence. Mike Kay Software AG > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|