HTML-friendly serialization of an XHTML page

Bug #867343 reported by Ghislain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
Medium
Nicolae Brinza

Bug Description

Hi,

At the moment, it is not possible for Zorba/Sausalito to produce JavaScript HTML/XHTML compatibility constructs like:

<script type="text/javascript">
//<![CDATA[

// JavaScript code here

//]]>
</script>

because it is only possible to tell the serializer to serialize the entire content of an element as a CDATA section (with cdata-section-elements), and not only part of it.

It would be great to have another serialization parameter, like html-friendly-scripts (true or false), specific to XQuery application servers, which automatically puts //<![CDATA[ and //]]> around the content of any script tag with type="text/javascript" and serializes the text node as CDATA. In the same way, it could also automatically put (: <![CDATA[ :) and (: ]]> :) around the content of any script tag with type="text/xquery" and serialize the text node as CDATA.

If one wants it more generic, instead of being true or false, it could be a set of tuples like ("text/javascript", "//<![CDATA[", "//]]>") or ("text/xquery", "(: <![CDATA[ :)", "(: ]]> :)") with the constraint that the second string contains "<![CDATA[" and the third string contains "]]>".

Thanks!

Chris Hillery (ceejatec)
tags: removed: serializer
tags: added: serialization
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.