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

RE: xml (source) file name in html (output format) met

Subject: RE: xml (source) file name in html (output format) meta tag
From: cknell@xxxxxxxxxx
Date: Tue, 24 Jun 2003 09:42:27 -0400
xsl source file name
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:   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

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.