Xml + xsl = html for email ??

Complete

OSNN Addict
Joined
25 Aug 2005
Messages
94
XML can do a very cool trick.

If you include the name of an XSL file in the XML file, you can produce what looks just like a formatted HTML file when you load the XML file into a browser.

The question I have is this. How would you actually produce an actual HTML file that can be sent as a formated email by using this XML and XSL combo?

Let me put it another way.

First of all, consider this. Email has the capacity to send HTML formated text.

Second of all, consider this. XML along with a stated XSL style sheet can be loaded into a browser to produce an HTML document (right?).

So can the same be said for an email message? If email is sophisticated to send and html file properly formatted and presented as if it was being viewed in a browser, can it also to the same with an xml file?

I imagine not. I would imagine that it could not pull off this trick. I imagine that the first order of business would be to use the xml and xsl files to produce the html file and then use that generated html file as the email.

So what code or tools can be used to produce this html file?
 
Re: Xml + xsl = html 4 email ??

Probably you can not do this kind of things because most of the mail clients has very restricted browser (Outlook for example does not recognise al ot of css properties and some html tags) and due to security concerns I don;t think they will apply xsl to a xml.

You may do some server side xml transformation to html for a letter.
 
Re: Xml + xsl = html 4 email ??

You would need to use an XML/XSLT parser to create the final document to send over email. The browsers within email clients are very restricted and by default will not download extra content, nor will they automatically display content that is given to them.

As for tools to do this? Well you have your standard browser. After the transformation is done you could save a copy of the file (I know this works in Safari), otherwise you may need to write custom sofware. There are plenty of libraries available that do XML parsing, and some even do XSLT.
 
Re: Xml + xsl = html 4 email ??

You would need to use an XML/XSLT parser to create the final document to send over email. The browsers within email clients are very restricted and by default will not download extra content, nor will they automatically display content that is given to them.

As for tools to do this? Well you have your standard browser. After the transformation is done you could save a copy of the file (I know this works in Safari), otherwise you may need to write custom sofware. There are plenty of libraries available that do XML parsing, and some even do XSLT.

Here is a worthy, follow-up question.
Does there exist a tool or a 3rd party program that can take an HTML file and split it up into an XML and XSL file that will effectively display the same thing in a browser than the original HTML file?
 
Re: Xml + xsl = html 4 email ??

Here is a worthy, follow-up question.
Does there exist a tool or a 3rd party program that can take an HTML file and split it up into an XML and XSL file that will effectively display the same thing in a browser than the original HTML file?

Yes, such a tool exists. It is called a human. He sits in front of a computer and creates the XML file that contains the data and the XSLT file that will do the translation.
 
Re: Xml + xsl = html 4 email ??

yes, such a tool exists. It is called a human. He sits in front of a computer and creates the xml file that contains the data and the xslt file that will do the translation.
lol! I think he may have been talking about a tool that automates it. ;)
 
Re: Xml + xsl = html 4 email ??

lol! I think he may have been talking about a tool that automates it. ;)

I am well aware. But how is the tool supposed to know what is valid content and what is markup? Taking two files to create one file is easy (XML + XSLT) but then taking that one file and splitting it back up into two is the hard part.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back