|
Subject: RE: [xsl] xml (source) file name in html (output format) meta tag From: cknell@xxxxxxxxxx Date: Tue, 24 Jun 2003 09:42:27 -0400 |
You must pass the name of the file as a command-line parameter. The format for this varies with the XSLT processor you are using. Inside your XSL stylesheet you will put <xsl:param name="source-file" />. When the processor loads the stylesheet it will assign the command-line value for the "source-file" parameter to a variable which you will refer to as "$source-file". By setting the output type to "text/html", you will be able to output a META element:
<META http-equiv="Content-Type" content="$source-file">
In order to vary the file name automatically with each invocation of the transformer, you will have to wrap the transformer in a batch (for Windows-based transforms) or shell script (for Linux, Unix, etc.) and pass the data file name as a parameter to the script file.
As I have heard it said, "Adding another level of indirection solves almost every programming problem."
--
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From: "Da Costa Martins, Iolanda Maria (Iolanda)"<dacostamartins@xxxxxxxxx>
Sent: Tue, 24 Jun 2003 07:52:56 -0400
To: "'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'" <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [xsl] xml (source) file name in html (output format) meta tag
Hi,
I am currently developing a style sheet that works with PegHelp (Windows CE)
in mobile devices...
Due to the specific requirements of PegHelp, I need to output the following
section in the beginning of the file:
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META http-equiv="Content-Type" content="{filename}.html">
<META name="SUBJECT" content="system">
<TITLE>TheTitle</TITLE>
</HEAD>
Where {filename} is a value that must match the actual file name of the XML
file that is being processed to HTML output.
For the transformation process I am using XSLT.
Do you know how could I get this value automatically (at run time of the
transformatio of each xml file) written to the meta tag of the html file?
Thanks
da Costa Martins, Iolanda
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] xml (source) file name in, Da Costa Martins, Io | Thread | RE: [xsl] xml (source) file name in, Jarno . Elovirta |
| RE: [xsl] xml (source) file name in, Da Costa Martins, Io | Date | RE: [xsl] Different Colors for Alte, Schwartz, Rechell R, |
| Month |