PDA

View Full Version : QXmlQuery XSLT20 not possibel to bindVariable <xsl:variable>



patrik08
17th September 2008, 16:52
QXmlQuery xquery(QXmlQuery::XSLT20);
qt4.5

xquery.bindVariable("unixtime", QVariant(timer1.toTime_t()));
can not replace variable
<xsl:variable name="unixtime" select="'0000000'" />
like gnome xslt... or i write mistake?

XSLT2 is comatible on XSLT1?

i like only to union 2 file and on variable
http://fop-miniscribus.googlecode.com/svn/trunk/doc/Xsltqt5/data.xml
http://fop-miniscribus.googlecode.com/svn/trunk/doc/Xsltqt5/style.xsl


http://fop-miniscribus.googlecode.com/svn/trunk/doc/Xsltqt5/

http://fop-miniscribus.googlecode.com/svn/trunk/doc/Xsltqt5/main.cpp main.cpp having query

I need XSLT2 to transform DB query to report as OpenOffice document.

IMO i can not post on qt4-preview-feedback@trolltech.com i having pass and all item..

patrik08
18th September 2008, 09:53
I post here a responder from news trolltech.qt4-preview-feedback to next search "XSLT" on forum.

On Thursday 18 September 2008 09:47:25 Patrik wrote:
> > QXmlQuery xquery(QXmlQuery::XSLT20);
> > qt4.5
> >
> > xquery.bindVariable("unixtime", QVariant(timer1.toTime_t()));
> > can not replace variable
> > <xsl:variable name="unixtime" select="'0000000'" />
> > like gnome xslt... or i write mistake?

Change xsl:variable to xsl:param and it works. xsl:param is used for
stylesheet parameters, while xsl:variable simply declares variables.


Cheers,

Frans