Subject: RE: [xsl] XALAN - obtaining the -XSL stylesheet name? From: "Robert Nicholson" <robert@xxxxxxxxxxxx> Date: Wed, 28 Mar 2001 21:06:08 -0800 |
You have created a separate stylesheet parameter for this. I can do this and will probably have to but since what I want to generate is derived from the stylesheet name I didn't want to have to create the parameter if there was someway of knowing the stylesheet that was passed. I think I understand your example here. You are passing a stylesheet parameter for your title value. That's a little different from what I was asking I think. > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Tim Watts > Sent: Wednesday, March 28, 2001 8:43 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] XALAN - obtaining the -XSL stylesheet name? > > > 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: [xsl] 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XALAN - obtaining the -XS, Tim Watts | Thread | RE: [xsl] XALAN - obtaining the -XS, Tim Watts |
RE: [xsl] XALAN - obtaining the -XS, Tim Watts | Date | [xsl] Navigation facility using xsl, tejas raval |
Month |