Re: [Xsltforms-support] external css stylesheets
Brought to you by:
alain-couthures
From: ac <ac...@hy...> - 2010-12-27 10:49:13
|
Hi, To try to better explain the situation, the xsltforms forms are on web site that is on a portal. The portal has global css stylesheet(s), each web site has its own css stylesheet(s) that overwrite elements of the portal stylesheet that need to be overwritten, and each forms can have its own css stylesheet(s) to further overwrite required styling rules. All these stylesheets need to be considered when rendering the xsltforms forms. PIs could be used for external css stylesheets but currently, xhtml link elements are used as in <link type="text/css" href="abc.css" rel="stylesheet"/>. How can we best ensure that all css stylesheets are properly considered and cascaded, for the forms? Thank you. Regards, Andre I am sorry, but I do not quite understand. For example, in the xsltforms.xsl file (line 98+), couldn't one have something like: ... <head> <xsl:copy-of select="xhtml:head/@* | head/@*"/> <xsl:copy-of select="*/xhtml:meta | */meta"/> <link type="text/css"href="{$resourcesdir}xsltforms.css"rel="stylesheet"/> <xsl:copy-of select="*/xhtml:link | */link"/> ... The source form is well formed xhtml, and there are no css directive to interpret, are there? Thank you, ac > Hello, > > Le 27/12/2010 06:58, ac a écrit : >> Hi, >> >> Is there a good reason why references to external css stylesheets, in an >> XSLTForm are not copied to the xhtml:head, by xsltforms.xsl, so that >> xsltforms can use external css stylesheets? > Yes, because XSLTForms can interpret CSS directives for XForms > elements using the syntax for namespaces (xf|trigger for example) as > the Mozilla extension does. > > Because this is performed by the XSLT stylesheet, the external files > are read with the document() XSLT function which requires the file to > be a well-formed XML document. > > This can be deactivated in the config.xsl files. Have a look at > http://en.wikibooks.org/wiki/XSLTForms/XSLTForms_only_Extensions >> A corollary to this question would be why not also copy meta tags? > Meta tags should be copied. Can you send a test case for this issue? > > Thanks! > > -Alain > |