Re: [Xsltforms-support] Problems with external user CSS
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-06-25 13:11:08
|
Hi Benoit, Thank you for testing XSLTForms. > 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>. > Because XSLT 1.0 is used by XSLTForms to parse CSS external file, its content has to be an XML document. Adding a document element, such as <css> at the beginning and </css> at the end, is enough. Hopefully browsers are not disturbed by this if your intend is to also use the CSS file in non-XForms situations. This can also be done dynamically at server side, for example with URL rewriting and a generic script for that. The test environment for XSLTForms is based on such a mechanism and you can have a look at http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/txs/css.txs?revision=85&view=markup > 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. > Yes, this is an already known bug in the beta release. You better test with the latest work version in the SVN repository at http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/trunk/build/ > 3) And a general question : what do you think about XForms generation directly from XSD definition of documents ? > Some years ago, I was very disappointed by a similar approach for relational databases based on DDL to automatically generate forms. Today, from XML schemas, possibilities are more interesting and some people, such as Dan McCreary, are definitely working on this. I haven't seen yet what can be produced. The main difficulty is that usually users need condensed interfaces. Data and presentation don't necessarily have the same goals. > PS: For information, I try to embbed "eXist" and "xsltForms" in an existing Ruby on Rail app (tired by SQL and ORM...) The beta release of XSLTForms has recently been added in eXist distribution ! Thanks! Alain Couthures <agenceXML> Bordeaux, France Twitter account: AlainCouthures |