[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Further clarification re:apply-imports

Subject: Further clarification re:apply-imports
From: "Nick Manson" <nmanson@xxxxxxxxxxxx>
Date: Thu, 21 Jan 1999 09:14:03 -0500
nick manson
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.