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

RE: XALAN - obtaining the -XSL stylesheet name?

Subject: RE: XALAN - obtaining the -XSL stylesheet name?
From: "Tim Watts" <timw@xxxxxxx>
Date: Thu, 29 Mar 2001 14:43:17 +1000
list contact address of watt
We use something like so...

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="../document.xsl" />
<xsl:include href="../common.xsl" />
<xsl:param name="title">Edit Settings Wizard</xsl:param>
<xsl:template name="body">
	...
</xsl:template>
</xsl:stylesheet>

with the document.xsl containing

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="document">
	<html lang="{language/html-language}" dir="{language/html-text-direction}">
		<head>
		<link rel="stylesheet" type="text/css"
href="{isp/settings/css-base}/{isp/settings/css-url}.css"/>
		<title><xsl:value-of select="$title"/></title>
		</head>
		<body>
		...
		<xsl:call-template name="body"/>
		...
		</body>
	</html>
</xsl:template>
</xsl:stylesheet>

This passes the param "title" to the html for use in the external
stylesheet, simular to how you want to pass a param to your external
stylesheet.

This can be directly duplicated into your style sheet in the same way. The
param is just declared in the first stylesheet and can be used in the
external one.

best wishes,

Tim Watts


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Robert
Nicholson
Sent: Thursday, 29 March 2001 2:20 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  XALAN - obtaining the -XSL stylesheet name?


Currently I have

resume-us-html.xsl defined as such

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import
href="http://localhost:8080/jobserve/jsp/resume-common-html.xsl"/>
<xsl:output method="html" indent="yes"/>
	<xsl:template match="contact-information">
		...
		<xsl:apply-templates select="us-address"/>
	</xsl:template>
	<xsl:template match="us-address">
		<address>
		...
		</address>
	</xsl:template>
	<xsl:template match="start-date">
		...
	</xsl:template>
</xsl:stylesheet>

Notice the import

Now the document element's (<resume>) template rule is defined in my common
stylesheet thus

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="resume">
<html>
<head>
<title>Resume</title>
</head>
<body onLoad="pagePopUp("url derived from stylesheet name")>

I want the url argument of pagePopUp of the resulting html to be derived
from the stylesheet that I'm passing as -XSL to XALAN which is the same
stylesheet that's importing the common stylesheet.


 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.