Subject: Further clarification re:apply-imports From: "Nick Manson" <nmanson@xxxxxxxxxxxx> Date: Thu, 21 Jan 1999 09:14:03 -0500 |
I have noticed a couple of ambiguities in the working draft with respect to 'apply-imports' that didn't seem to be covered by the earlier thread on this topic (as far as I could tell). 1) How does apply-imports interact with 'global' (my term) settings such as: a) the indent-result, result-ns and default-space attributes? b) the strip-space and preserve-space elements? and 2) Must imported stylesheets be complete? It would appear from the WD that I could do something like this: <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="" default-space="preserve" indent-result="yes"> <xsl:import href="2.xsl"/> <xsl:import href="3.xsl"/> <xsl:strip-space element="bar"> <xsl:constant name="foo" value="foo"/> <xsl:template match="bar"> <p><xsl:apply-imports/></p> </xsl:template> ... </xsl:stylesheet> where 2.xsl is <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:constant name="bar" value="bar"/> </xsl:stylesheet> and where 3.xsl is <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:fo="http://www.w3.org/TR/WD-xsl/FO" result-ns="fo" default-space="strip" indent-result="yes"> ... </xsl:stylesheet> This raises a couple of questions: 1) Can the result namespace change when an applying imports? On the surface at least, this would seem useful. 2) Which default spacing rule applies and over which section of the document? You obviously can't merge the rule 'strip whitespace from all elements' with the rule 'strip whitespace from no elements'. So, either they are scoped or one of them wins. The same applies for the indent-result attribute. 3) Can a rule in 3.xsl use the "foo" constant declared in 1.xsl? Can a rule in 3.xsl use the constant "bar" in 2.xsl? I don't think so in either case, but I would like some second opinions. - Nick. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XML Document Routing, Brian Vandewettering | Thread | Re: Further clarification re:apply-, James Clark |
Re: XSL Processors - Koala, Jeremy CALLES | Date | Match pattern, Oren Ben-Kiki |
Month |