Project

Profile

Help

Bug #4391

Updated by Michael Kay about 5 years ago

Using <oXygen/> XML Editor 21.1, build 2019101513 and its in-menu *Tools > Compile XSL Stylesheet for Saxon...* command.  

 *About > Libraries* claims Saxon EE 9.8.0.12. 

 In preview the following XML code seems to be partially eaten by the render engine, so I've also attached them as files. 

 File 1: `root.xsl` 

 
 ~~~ 
 <xsl:transform 
	 expand-text="yes" 
	 extension-element-prefixes="ixsl" 
	 version="3.0" 
	 xmlns="http://www.w3.org/1999/xhtml" 
	 xmlns:ixsl="http://saxonica.com/ns/interactiveXSLT" 
	 xmlns:rh="urn:publicid:rh" 
	 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

	 <xsl:use-package 
		 name="urn:publicid:rh:second"> 
		 <xsl:override> 
			 <xsl:template 
				 match="html/head/title" 
				 mode="rh:init"> 
				 <xsl:result-document 
					 href="?." 
					 method="ixsl:replace-content">Root Title</xsl:result-document> 
			 </xsl:template> 
		 </xsl:override> 
	 </xsl:use-package> 
 </xsl:transform> 
 ~~~ 

 File 2: `second.xsl` 

 
 ~~~ 
 <xsl:package 
	 expand-text="yes" 
	 extension-element-prefixes="ixsl" 
	 name="urn:publicid:rh:second" 
	 package-version="1.0.0" 
	 version="3.0" 
	 xmlns="http://www.w3.org/1999/xhtml" 
	 xmlns:ixsl="http://saxonica.com/ns/interactiveXSLT" 
	 xmlns:rh="urn:publicid:rh" 
	 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

	 <xsl:mode 
		 name="rh:init" 
		 visibility="public" /> 

	 <xsl:template 
		 name="xsl:initial-template" 
		 visibility="public"> 
		 <xsl:message>start xsl:initial-template</xsl:message> 
		 <xsl:apply-templates 
			 mode="rh:init" 
			 select="ixsl:page()" /> 
		 <xsl:message>exit xsl:initial-template</xsl:message> 
	 </xsl:template> 

	 <xsl:template 
		 match="html/head/title" 
		 mode="rh:init"> 
		 <xsl:result-document 
			 href="?." 
			 method="ixsl:replace-content">Second Title</xsl:result-document> 
	 </xsl:template> 

 </xsl:package> 
 ~~~ 

 File 3: `saxon.conf.xml`: 

 
 ~~~ 
 <configuration 
	 edition="EE" 
	 label="SaxonJSUI" 
	 xmlns="http://saxon.sf.net/ns/configuration"> 
	 <xsltPackages> 
		 <package 
			 name="urn:publicid:rh:second" 
			 sourceLocation="file:/ ...elided... /rh.library/xsl/second.xsl" 
			 version="1.0.0" /> 
	 </xsltPackages> 
 </configuration> 
 ~~~ 

 On compiling `root.xsl`, I get the error `Cannot find a 0-argument function named {http://saxonica.com/ns/interactiveXSLT}page()` 

 Installing the Saxon 9.9 add-on and using the toolbar *Compile XSLT Saxon 9.9* does, however, succeed.

Back