I would have it insert additional headers, not replace them. Folks can
always hack the XSLT if they need something custom...
Oh, and don't forget the *_jp.xslt files!
On 4/24/10 5:14 AM, Henry Minsky wrote:
Forgot to include a file in the patch..
But there is an issue that I just realized, which is that in the current
html-response.xslt, there are already some headers
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<link rel="SHORTCUT ICON"
href="http://www.laszlosystems.com/favicon.ico"/>
<!-- this tag helps laszlo apps look good on the iPhone. -->
<meta name="viewport" content="width=device-width;
initial-scale=1.0;"/>
And this change just lets you add new headers via your app, it doesn't remove
any that are already in a template.
Should the xsl actually substitute in your headers, or just append them in the
wrappers? For this change I just have
the wrapperheaders getting inserted into the app-console.xslt and
html-response.xslt files...
Change 20100423-hqm-T by [email protected] on 2010-04-23 22:44:16 EDT
in /Users/hqm/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: add HTML wrapper passthrough tag to LZX
New Features:
Bugs Fixed: LPP-8901 support 'webapps'
Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
A new tag is supported on the canvas, to add HTML content to the head of the
autogenerated HTML wrapper page.
example:
<wrapperheaders>
<meta name = "viewport" content = "initial-scale = 2.3, user-scalable =
no"/>
<link rel="apple-touch-icon-precomposed" href="/custom_icon.png"/>
</wrapperheaders>
Overview:
The<wrapperheaders> tag can be placed as a direct child of the canvas. Content
is passed through the generated Canvas XML, to the XSL template processor.
The app-console and html template insert the content into the<head> of their
generated
HTML page.
Details:
Compiler.java:
Add new special form,<wrapperheaders>
Canvas.java:
insert<wrapperheaders> into the generated canvas XML which is used by the
XSL templates
app-console.xslt:
add the content to the<head> tag of the HTML wrapper
SOLO apps will get this automatically because the SOLO builder fetches the
wrapper from the server.
Tests:
See attached test case hello.lzx.
Fetch this page as hello.lzx or hello.lzx?lzt=html, and verify that the content
inside of
the<wrapperheaders> tag shows up in the<head> of the generated HTML page.
Files:
M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Canvas.java
A WEB-INF/lps/server/src/org/openlaszlo/compiler/WrapperHeaders.java
M WEB-INF/lps/templates/html-response.xslt
M WEB-INF/lps/templates/app-console.xslt
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100423-hqm-T.tar
--
Regards,
Max Carlson
OpenLaszlo.org