Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Yaws EHML and XHTML

Guest
Posted: Tue Aug 29, 2006 4:56 pm Reply with quote
Guest
Hello all,

Late last night I made the following change to my local copy of Yaws
in order to emit valid XHTML trough the Yaws {ehtml, ...} API. Is
there a better way to achive the desired effect?

-JC


changeset: Omit end tag from empty elements as per XHTML.
changeset 12: f5e6e674abbd
parent 11: 41ba8ed1f75d
tag: tip
date: Tue Aug 29 16:44:01 2006 +0000 (107 seconds ago)
files: lib/yaws-1.64/src/yaws_api.erl
description: Omit end tag from empty elements as per XHTML.
(Emits HTML compatible XHTML.)

--- a/lib/yaws-1.64/src/yaws_api.erl Tue Aug 29 16:40:32 2006 +0000
+++ b/lib/yaws-1.64/src/yaws_api.erl Tue Aug 29 16:44:01 2006 +0000
@@ -1159,8 +1159,7 @@ ehtml_expand({pre_html, X}) -> X;
ehtml_expand({pre_html, X}) -> X;
ehtml_expand({Tag, Attrs}) ->
NL = ehtml_nl(Tag),
- [NL, "<", atom_to_list(Tag), ehtml_attrs(Attrs), "></",
- atom_to_list(Tag), ">"];
+ [NL, "<", atom_to_list(Tag), ehtml_attrs(Attrs), "/ >"];
ehtml_expand({Tag, Attrs, Body}) when atom(Tag) ->
Ts = atom_to_list(Tag),
NL = ehtml_nl(Tag),



--
Jeroen "Slim" van Gelderen - +1 242 646 8656

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Tue Aug 29, 2006 9:18 pm Reply with quote
Guest
Jeroen van Gelderen wrote:
> Hello all,
>
> Late last night I made the following change to my local copy of Yaws
> in order to emit valid XHTML trough the Yaws {ehtml, ...} API. Is
> there a better way to achive the desired effect?
>

Taken, thanks.

/klacke

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum