[Xsltforms-support] Problems with external user CSS
Brought to you by:
alain-couthures
|
From: <ben...@en...> - 2009-06-25 08:59:32
|
Hi,
I've tried xsltForms and I had some problems with my own CSS :
My CSS is generated by haml/sass (from the ruby world) and looks like this:
/* balises générales */
html, body { height: 100%; overflow: hidden; margin: 0ex; padding: 0ex; background: #ffffff; }
body { max-height: 100%; }
body.dialog { overflow: visible; }
p, ul, input, select, body { font-family: 'Trebuchet MS', Geneva, Verdana, Arial, Helvetica, 'Century Gothic', sans-serif; font-size: 10pt; color: #000000; }
textarea, input { font-family: 'Bitstream Vera Sans Mono','Courier',monospace; font-size: 9.5pt; color: #000000; }
/* banner */
div#banner { display: block; height: 18px; position: absolute; top: 80px; width: 100%; z-index: 9; right: 18px; padding: 2px 0px; background: #ebf0f6; border-top: 1px solid #b0c4de; border-bottom: 1px solid #b0c4de; }
div#banner div#applications ul.tabs { margin: 0px; padding: 0px; border: 0px; }
div#banner div#applications ul.tabs li { margin-left: 0px; margin-right: -6px; list-style-type: none; display: inline; }
...
1) When I insert a stylesheet link <link href="http://sisal.dvp/corpus/stylesheets/sisal/sisal.css" media="screen" rel="stylesheet" type="text/css" /> in my page. I obtain, after transform by my Firefox, an empty inline style <style>{}</style>.
2) So I tried to directly inline my CSS in the page with <style> markup. It's better but some CSS rules are corrupted. Ie:
div#banner div#applications ul.tabs li { margin-left: 0px; margin-right: -6px; list-style-type: none; display: inline; }
become
div#bannerdiv#applicationsul.tabsli { margin-left: 0px; margin-right: -6px; list-style-type: none; display: inline; }
I suspect a pb around the "cssconv" template. I tried to modify the line #2188 from:
<xsl:with-param name="sels" select="translate(substring-before($input,'{'),' ','')"/>
To
<xsl:with-param name="sels" select="translate(substring-before($input,'{'),' ',' ')"/>
And now it works better (rendering is OK, javascript not...), but since I don't really know what the "cssconv" template does I'afraid I'm breaking some thing else.
3) And a general question : what do you think about XForms generation directly from XSD definition of documents ?
Thank's for your job
Benoit VINCENT
PS: For information, I try to embbed "eXist" and "xsltForms" in an existing Ruby on Rail app (tired by SQL and ORM...) .
|