Re: [Xsltforms-support] XSLTForms + eXist
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-09-30 14:01:29
|
Hi Wolfgang, Thank you for looking at XSLTForms transformation on server side. I will have to test these two small fixes on my own configuration before committing them. By the way, testing with Dan McCreary, it appears that this option is also required for XSLTForms : declare option exist:serialize "indent=no"; to prevent the serializer to indent the result of the transformation. Thanks! -Alain Wolfgang a écrit : > Hi Alain, > > I was looking into how to apply the xsltforms stylesheet on the server > instead of the client. I needed to make 2 small fixes to the > xsltforms.xsl stylesheet to get it to work properly: > > 1) two lines in the generated javascript assume that the xsltforms.js > code has already been loaded: > > Core.fileName='xsltforms.js'; > > Dialog.show('statusPanel'); > > The assumption works sometimes, but mostly doesn't and causes the > entire script to fail. Just moving the two statements *inside* the > init() function fixes the issue for me. > > 2) location of xsltforms.js and xsltforms.css: the stylesheet > determines the basedir for loading those resources by looking at the > processing instruction. However, if the stylesheet is applied by a > script on the server, there won't be processing instruction. I thus > introduced a stylesheet parameter: > > <xsl:param name="baseuri"/> > > which is then checked to determine $resourcesdir: > > <xsl:variable name="resourcesdir"> > <xsl:choose> > <xsl:when test="$baseuri != ''"> > <xsl:value-of select="$baseuri"/> > </xsl:when> > <xsl:otherwise> > <xsl:value-of select="substring-before($href, > 'xsltforms.xsl')"/> > </xsl:otherwise> > </xsl:choose> > </xsl:variable> > > Wolfgang > |