• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Xml + xsl = html for email ??

#1
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?
 

osnnraptor

OSNN One Post Wonder
#2
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.
 

X-Istence

*
Political User
#3
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.
 
#4
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?
 

X-Istence

*
Political User
#5
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.
 

Gigabot

OSNN Senior Addict
#6
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. ;)
 

X-Istence

*
Political User
#7
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 posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,240
Members
89,015
Latest member
loxioalix