Re: [xsl] Determining the extension of the output file?

Subject: Re: [xsl] Determining the extension of the output file?
From: "bix xslt" <bix_xslt@xxxxxxxxxxx>
Date: Wed, 05 Mar 2003 22:44:26 +0000
Esther,

Reading through your email, it appears that you have a few transformation paths: XML->XML, XML->HTML. However, you mention that you are interested in finding out whether or not your data conversion is html or xml.

A suggestion for you might be to write your transformations in such a way that every transformation produces either a full xml tree or an xml fragment. Then keep this xml data persistant within your software, only producing the html as needed. In addition, produce the HTML only as a mechanism of publishing rather than data manipulation.

Hope that helps,
bix




From: Esther Parrilla Endrino <esther.parrilla@xxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] Determining the extension of the output file?
Date: Wed, 05 Mar 2003 15:38:40 +0100

Hello all,

I am doing a very simple example that transforms an XML file into and HTML file after applying and XSL using libxml2 and libxslt.
I use the xmlSaveFile() function to save to disk the output HTML file.
For that I put in my code:
...
res = xsltApplyStylesheet(cur, doc, params)
xmlSaveFile("output.html", res);
...


But my problem is that sometimes I am going to use an XSL that shall transform the XML to HTML and sometimes I shall use other XSL that shall transform the XML to another different XML... and I would like to call my output file output.html or output.xml depending on the type of XSL I apply.

So I have thought that when I am parsing my XSL with the function xsltParseStylesheetFile() I should try to determine if there is an <html...> tag in the XSL or and <xml...>. I have been looking for a function in the libxslt API that can di this for mi but I haven´t found any :( ...

Does anybody knows if there is a function in the libxslt API that can do that?
Should I look in the libxml2 API instead?


Thanks in advance!

esther

--

Esther Parrilla Endrino
Ground Segment Systems Division
DEIMOS SPACE S.L.
e-mail: esther.parrilla@xxxxxxxxxxxxxxxx
tel:  	00 34 91 806 34 57

~ Code matters more than comercials ~

--



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread